Commit 4f9c7c68 authored by mercury233's avatar mercury233

format: space

parent 5a64bbae
...@@ -17,7 +17,7 @@ function c10860121.initial_effect(c) ...@@ -17,7 +17,7 @@ function c10860121.initial_effect(c)
end end
function c10860121.cfilter(c,tp) function c10860121.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsReason(REASON_BATTLE) and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsReason(REASON_BATTLE)
end end
function c10860121.condition(e,tp,eg,ep,ev,re,r,rp) function c10860121.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10860121.cfilter,1,nil,tp) return eg:IsExists(c10860121.cfilter,1,nil,tp)
......
...@@ -25,7 +25,7 @@ function c11834972.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,7 +25,7 @@ function c11834972.cost(e,tp,eg,ep,ev,re,r,rp,chk)
table.insert(ct,i) table.insert(ct,i)
end end
end end
if #ct==1 then if #ct==1 then
Duel.DiscardDeck(tp,ct[1],REASON_COST) Duel.DiscardDeck(tp,ct[1],REASON_COST)
else else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11834972,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11834972,1))
......
...@@ -22,7 +22,7 @@ end ...@@ -22,7 +22,7 @@ end
function c12183332.operation(e,tp,eg,ep,ev,re,r,rp) function c12183332.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local opt=Duel.SelectOption(tp,aux.Stringid(12183332,1),aux.Stringid(12183332,2)) local opt=Duel.SelectOption(tp,aux.Stringid(12183332,1),aux.Stringid(12183332,2))
if opt==0 then if opt==0 then
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
else else
Duel.ShuffleDeck(1-tp) Duel.ShuffleDeck(1-tp)
......
...@@ -14,7 +14,7 @@ function c12469386.initial_effect(c) ...@@ -14,7 +14,7 @@ function c12469386.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c12469386.filter(c,tp) function c12469386.filter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
and c:GetPreviousLevelOnField()>=5 and bit.band(c:GetPreviousRaceOnField(),RACE_PLANT)~=0 and c:GetPreviousLevelOnField()>=5 and bit.band(c:GetPreviousRaceOnField(),RACE_PLANT)~=0
end end
function c12469386.spcon(e,tp,eg,ep,ev,re,r,rp) function c12469386.spcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -17,7 +17,7 @@ function c12538374.filter(c) ...@@ -17,7 +17,7 @@ function c12538374.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) or (c:IsCode(12538374) and c:IsFaceup()) return c:IsType(TYPE_SPELL+TYPE_TRAP) or (c:IsCode(12538374) and c:IsFaceup())
end end
function c12538374.condition(e,tp,eg,ep,ev,re,r,rp) function c12538374.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c12538374.filter,tp,LOCATION_ONFIELD,0,1,nil) return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c12538374.filter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c12538374.target(e,tp,eg,ep,ev,re,r,rp,chk) function c12538374.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -68,7 +68,7 @@ function c12644061.distg(e,c) ...@@ -68,7 +68,7 @@ function c12644061.distg(e,c)
end end
function c12644061.condition(e) function c12644061.condition(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY) return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY)
and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_NECRO_VALLEY) and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_NECRO_VALLEY)
end end
function c12644061.damcon(e,tp,eg,ep,ev,re,r,rp) function c12644061.damcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -38,7 +38,7 @@ function c1372887.cfilter(c,tp) ...@@ -38,7 +38,7 @@ function c1372887.cfilter(c,tp)
return c:IsControler(1-tp) and not c:IsReason(REASON_DRAW) and c:IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE) return c:IsControler(1-tp) and not c:IsReason(REASON_DRAW) and c:IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE)
end end
function c1372887.drcon1(e,tp,eg,ep,ev,re,r,rp) function c1372887.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1372887.cfilter,1,nil,tp) return eg:IsExists(c1372887.cfilter,1,nil,tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS)) and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end end
function c1372887.drop1(e,tp,eg,ep,ev,re,r,rp) function c1372887.drop1(e,tp,eg,ep,ev,re,r,rp)
...@@ -46,7 +46,7 @@ function c1372887.drop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function c1372887.drop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
function c1372887.regcon(e,tp,eg,ep,ev,re,r,rp) function c1372887.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1372887.cfilter,1,nil,tp) and Duel.GetFlagEffect(tp,1372887)==0 return eg:IsExists(c1372887.cfilter,1,nil,tp) and Duel.GetFlagEffect(tp,1372887)==0
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS) and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end end
function c1372887.regop(e,tp,eg,ep,ev,re,r,rp) function c1372887.regop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,8 +21,8 @@ function c14391920.filter(c) ...@@ -21,8 +21,8 @@ function c14391920.filter(c)
end end
function c14391920.target(e,tp,eg,ep,ev,re,r,rp,chk) function c14391920.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(c14391920.filter,tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_GRAVE,1,nil) return Duel.IsExistingMatchingCard(c14391920.filter,tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
and not Duel.IsExistingMatchingCard(c14391920.chkfilter,tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and not Duel.IsExistingMatchingCard(c14391920.chkfilter,tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
end end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
......
...@@ -14,7 +14,7 @@ function c14517422.filter(c,e,tp) ...@@ -14,7 +14,7 @@ function c14517422.filter(c,e,tp)
return c:IsSetCard(0xef) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsSetCard(0xef) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c14517422.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c14517422.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c14517422.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c14517422.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
......
...@@ -53,7 +53,7 @@ end ...@@ -53,7 +53,7 @@ end
function c14536035.sgop(e,tp,eg,ep,ev,re,r,rp) function c14536035.sgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c14536035.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c14536035.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
...@@ -12,7 +12,7 @@ function c16111820.initial_effect(c) ...@@ -12,7 +12,7 @@ function c16111820.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c16111820.filter(c,tp) function c16111820.filter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_DEFENSE) and c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) return c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_DEFENSE) and c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE)
and c:IsSetCard(0x22) and c:GetCode()~=16111820 and c:IsSetCard(0x22) and c:GetCode()~=16111820
end end
function c16111820.condition(e,tp,eg,ep,ev,re,r,rp) function c16111820.condition(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -39,7 +39,7 @@ function c1644289.eqlimit(e,c) ...@@ -39,7 +39,7 @@ function c1644289.eqlimit(e,c)
return c:IsSetCard(0x30) return c:IsSetCard(0x30)
end end
function c1644289.tglimit(e,re,rp) function c1644289.tglimit(e,re,rp)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP+TYPE_MONSTER) return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP+TYPE_MONSTER)
end end
function c1644289.filter(c) function c1644289.filter(c)
return c:IsFaceup() and c:IsSetCard(0x30) return c:IsFaceup() and c:IsSetCard(0x30)
......
...@@ -27,7 +27,7 @@ function c1662004.spfilter(c,e,tp) ...@@ -27,7 +27,7 @@ function c1662004.spfilter(c,e,tp)
return c:IsDefenseBelow(200) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevel(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsDefenseBelow(200) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevel(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c1662004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c1662004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1662004.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1662004.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c1662004.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c1662004.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -49,9 +49,9 @@ function c16832845.filter(c) ...@@ -49,9 +49,9 @@ function c16832845.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end end
function c16832845.target(e,tp,eg,ep,ev,re,r,rp,chk) function c16832845.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(c16832845.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and return Duel.IsExistingMatchingCard(c16832845.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and
not Duel.IsExistingMatchingCard(c16832845.chkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) not Duel.IsExistingMatchingCard(c16832845.chkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
end end
local g=Duel.GetMatchingGroup(c16832845.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(c16832845.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
......
...@@ -22,7 +22,7 @@ function c17266660.costfilter(c) ...@@ -22,7 +22,7 @@ function c17266660.costfilter(c)
end end
function c17266660.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c17266660.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and if chk==0 then return c:IsAbleToGraveAsCost() and
Duel.IsExistingMatchingCard(c17266660.costfilter,tp,LOCATION_HAND,0,1,c) end Duel.IsExistingMatchingCard(c17266660.costfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c17266660.costfilter,tp,LOCATION_HAND,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c17266660.costfilter,tp,LOCATION_HAND,0,1,1,c)
......
...@@ -18,7 +18,7 @@ function c17418744.counterfilter(c) ...@@ -18,7 +18,7 @@ function c17418744.counterfilter(c)
end end
function c17418744.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c17418744.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(17418744,tp,ACTIVITY_SUMMON)==0 if chk==0 then return Duel.GetCustomActivityCount(17418744,tp,ACTIVITY_SUMMON)==0
and Duel.GetCustomActivityCount(17418744,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetCustomActivityCount(17418744,tp,ACTIVITY_SPSUMMON)==0
and Duel.GetCustomActivityCount(17418744,tp,ACTIVITY_FLIPSUMMON)==0 end and Duel.GetCustomActivityCount(17418744,tp,ACTIVITY_FLIPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -62,7 +62,7 @@ function c17775525.filter(c) ...@@ -62,7 +62,7 @@ function c17775525.filter(c)
end end
function c17775525.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c17775525.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(c17775525.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) return Duel.IsExistingMatchingCard(c17775525.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
and not Duel.IsExistingMatchingCard(c17775525.chkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and not Duel.IsExistingMatchingCard(c17775525.chkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
end end
local g=Duel.GetMatchingGroup(c17775525.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(c17775525.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
......
...@@ -35,7 +35,7 @@ function c19261966.splimit(e,se,sp,st) ...@@ -35,7 +35,7 @@ function c19261966.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end end
function c19261966.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) function c19261966.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return se:IsActiveType(TYPE_SPELL+TYPE_TRAP) and se:IsHasType(EFFECT_TYPE_ACTIONS) return se:IsActiveType(TYPE_SPELL+TYPE_TRAP) and se:IsHasType(EFFECT_TYPE_ACTIONS)
and c:IsLocation(LOCATION_GRAVE+LOCATION_HAND) and c:IsLocation(LOCATION_GRAVE+LOCATION_HAND)
end end
function c19261966.thfilter(c) function c19261966.thfilter(c)
......
...@@ -52,7 +52,7 @@ function c19596712.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,7 @@ function c19596712.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c19596712.negcon(e,tp,eg,ep,ev,re,r,rp) function c19596712.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_SZONE return rp==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_SZONE
and re:IsActiveType(TYPE_TRAP) and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainDisablable(ev)
end end
function c19596712.negop(e,tp,eg,ep,ev,re,r,rp) function c19596712.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) then if Duel.NegateEffect(ev) then
......
...@@ -37,7 +37,7 @@ function c1995985.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,7 @@ function c1995985.disop(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsType(TYPE_SPELL) or rp==tp then return end if not re:GetHandler():IsType(TYPE_SPELL) or rp==tp then return end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g and g:IsContains(e:GetHandler()) then if g and g:IsContains(e:GetHandler()) then
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
end end
......
...@@ -72,7 +72,7 @@ function c20057949.filter(c,e,tp) ...@@ -72,7 +72,7 @@ function c20057949.filter(c,e,tp)
return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c20057949.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c20057949.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c20057949.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c20057949.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
......
...@@ -51,7 +51,7 @@ function c20137754.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c20137754.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c20137754.atkcon(e,tp,eg,ep,ev,re,r,rp) function c20137754.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(20137754)>0 return e:GetHandler():GetFlagEffect(20137754)>0
and aux.dscon() and aux.dscon()
end end
function c20137754.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c20137754.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -26,7 +26,7 @@ function c20590515.initial_effect(c) ...@@ -26,7 +26,7 @@ function c20590515.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c20590515.target(e,tp,eg,ep,ev,re,r,rp,chk) function c20590515.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,20590515,0,0x11,500,1800,5,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end Duel.IsPlayerCanSpecialSummonMonster(tp,20590515,0,0x11,500,1800,5,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
......
...@@ -32,7 +32,7 @@ function c20612097.spfilter(c,e,tp,check) ...@@ -32,7 +32,7 @@ function c20612097.spfilter(c,e,tp,check)
and (check or c:IsSetCard(0x1142)) and (check or c:IsSetCard(0x1142))
end end
function c20612097.target(e,tp,eg,ep,ev,re,r,rp,chk) function c20612097.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chk1=Duel.IsExistingMatchingCard(c20612097.filter,tp,LOCATION_MZONE,0,1,nil) local chk1=Duel.IsExistingMatchingCard(c20612097.filter,tp,LOCATION_MZONE,0,1,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c20612097.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,chk1) and Duel.IsExistingMatchingCard(c20612097.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,chk1)
......
...@@ -47,7 +47,7 @@ function c20747792.spfilter(c,e,tp) ...@@ -47,7 +47,7 @@ function c20747792.spfilter(c,e,tp)
return c:IsSetCard(0x20a2) and not c:IsCode(20747792) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x20a2) and not c:IsCode(20747792) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c20747792.spcon1(e,tp,eg,ep,ev,re,r,rp) function c20747792.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler()) and rp==1-tp return eg:IsContains(e:GetHandler()) and rp==1-tp
end end
function c20747792.spcon2(e,tp,eg,ep,ev,re,r,rp) function c20747792.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler()) and Duel.GetAttacker():IsControler(1-tp) return eg:IsContains(e:GetHandler()) and Duel.GetAttacker():IsControler(1-tp)
......
...@@ -48,7 +48,7 @@ function c20822520.aclimit(e,re,tp) ...@@ -48,7 +48,7 @@ function c20822520.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:IsActiveType(TYPE_SPELL) and not re:GetHandler():IsSetCard(0x106e)
end end
function c20822520.target(e,tp,eg,ep,ev,re,r,rp,chk) function c20822520.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<2 then return false end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<2 then return false end
local g=Duel.GetDecktopGroup(tp,2) local g=Duel.GetDecktopGroup(tp,2)
return g:FilterCount(Card.IsAbleToHand,nil)>0 return g:FilterCount(Card.IsAbleToHand,nil)>0
......
...@@ -23,7 +23,7 @@ function c21074344.costfilter(c) ...@@ -23,7 +23,7 @@ function c21074344.costfilter(c)
end end
function c21074344.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c21074344.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and if chk==0 then return c:IsAbleToGraveAsCost() and
Duel.IsExistingMatchingCard(c21074344.costfilter,tp,LOCATION_HAND,0,1,c) end Duel.IsExistingMatchingCard(c21074344.costfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c21074344.costfilter,tp,LOCATION_HAND,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c21074344.costfilter,tp,LOCATION_HAND,0,1,1,c)
......
...@@ -83,7 +83,7 @@ function c21105106.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -83,7 +83,7 @@ function c21105106.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c21105106.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c21105106.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,e:GetHandler()) return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,e:GetHandler())
and not Duel.IsExistingMatchingCard(aux.NOT(Card.IsAbleToRemove),tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,e:GetHandler()) and not Duel.IsExistingMatchingCard(aux.NOT(Card.IsAbleToRemove),tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,e:GetHandler())
end end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,e:GetHandler()) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,e:GetHandler())
......
...@@ -58,7 +58,7 @@ function c21208154.filter(c) ...@@ -58,7 +58,7 @@ function c21208154.filter(c)
end end
function c21208154.adval(e,c) function c21208154.adval(e,c)
local g=Duel.GetMatchingGroup(c21208154.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c21208154.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then if g:GetCount()==0 then
return 100 return 100
else else
local tg,val=g:GetMaxGroup(Card.GetAttack) local tg,val=g:GetMaxGroup(Card.GetAttack)
...@@ -74,7 +74,7 @@ function c21208154.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +74,7 @@ function c21208154.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c21208154.aclimit) e1:SetValue(c21208154.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) Duel.RegisterEffect(e1,tp)
end end
function c21208154.aclimit(e,re,tp) function c21208154.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
...@@ -16,7 +16,7 @@ function c21843307.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c21843307.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c21843307.target(e,tp,eg,ep,ev,re,r,rp,chk) function c21843307.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=eg:GetFirst() local ec=eg:GetFirst()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and 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,0x11,0,0,ec:GetLevel(),RACE_WARRIOR,ATTRIBUTE_LIGHT) end
ec:CreateEffectRelation(e) ec:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
......
...@@ -27,7 +27,7 @@ end ...@@ -27,7 +27,7 @@ end
function c21924381.activate(e,tp,eg,ep,ev,re,r,rp) function c21924381.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e)
and a:IsAttackable() and a:IsRelateToEffect(e) and not a:IsImmuneToEffect(e)then and a:IsAttackable() and a:IsRelateToEffect(e) and not a:IsImmuneToEffect(e)then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -17,7 +17,7 @@ function c22419772.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,7 +17,7 @@ function c22419772.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c22419772.filter(c,tp,tid) function c22419772.filter(c,tp,tid)
return c:IsAbleToDeck() and c:IsType(TYPE_SPELL) and c:GetTurnID()==tid and c:GetReasonPlayer()==1-tp return c:IsAbleToDeck() and c:IsType(TYPE_SPELL) and c:GetTurnID()==tid and c:GetReasonPlayer()==1-tp
end end
function c22419772.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22419772.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tid=Duel.GetTurnCount() local tid=Duel.GetTurnCount()
......
...@@ -15,7 +15,7 @@ function c22587018.filter(c,e,tp) ...@@ -15,7 +15,7 @@ function c22587018.filter(c,e,tp)
return c:IsCode(22587018) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(22587018) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c22587018.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c22587018.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22587018.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c22587018.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -18,7 +18,7 @@ function c23557835.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,7 +18,7 @@ function c23557835.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,2000) Duel.PayLPCost(tp,2000)
end end
function c23557835.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c23557835.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return if chk==0 then return
(Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c23557835.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp)) or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c23557835.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp)) or
(Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c23557835.filter,tp,0,LOCATION_REMOVED,1,nil,e,1-tp)) (Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c23557835.filter,tp,0,LOCATION_REMOVED,1,nil,e,1-tp))
end end
......
...@@ -13,7 +13,7 @@ function c23681456.filter(c,e,tp) ...@@ -13,7 +13,7 @@ function c23681456.filter(c,e,tp)
return c:IsSetCard(0x71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c23681456.target(e,tp,eg,ep,ev,re,r,rp,chk) function c23681456.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c23681456.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c23681456.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
......
...@@ -92,7 +92,7 @@ function c24096228.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +92,7 @@ function c24096228.operation(e,tp,eg,ep,ev,re,r,rp)
etc:CreateEffectRelation(te) etc:CreateEffectRelation(te)
etc=g:GetNext() etc=g:GetNext()
end end
if op then if op then
if tc:IsSetCard(0x95) then if tc:IsSetCard(0x95) then
op(e,tp,eg,ep,ev,re,r,rp) op(e,tp,eg,ep,ev,re,r,rp)
else else
......
...@@ -15,7 +15,7 @@ function c24285858.filter(c) ...@@ -15,7 +15,7 @@ function c24285858.filter(c)
end end
function c24285858.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c24285858.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c24285858.filter(chkc) end if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c24285858.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c24285858.filter,tp,LOCATION_GRAVE,0,3,nil) end and Duel.IsExistingTarget(c24285858.filter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c24285858.filter,tp,LOCATION_GRAVE,0,3,3,nil) local g=Duel.SelectTarget(tp,c24285858.filter,tp,LOCATION_GRAVE,0,3,3,nil)
......
...@@ -12,7 +12,7 @@ function c24566654.cfilter(c) ...@@ -12,7 +12,7 @@ function c24566654.cfilter(c)
return c:IsFaceup() and c:IsCode(70902743) return c:IsFaceup() and c:IsCode(70902743)
end end
function c24566654.condition(e,tp,eg,ep,ev,re,r,rp) function c24566654.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c24566654.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) return Duel.IsExistingMatchingCard(c24566654.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp)
end end
function c24566654.operation(e,tp,eg,ep,ev,re,r,rp) function c24566654.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -13,7 +13,7 @@ function c25518020.initial_effect(c) ...@@ -13,7 +13,7 @@ function c25518020.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_MACHINE)) e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_MACHINE))
e2:SetValue(200) e2:SetValue(200)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--add counter --add counter
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
...@@ -13,7 +13,7 @@ end ...@@ -13,7 +13,7 @@ end
function c2584136.eqcon(e,tp,eg,ep,ev,re,r,rp) function c2584136.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and rp==1-tp return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and rp==1-tp
and bc:IsFaceup() and bc:IsRelateToBattle() and bc:IsFaceup() and bc:IsRelateToBattle()
end end
function c2584136.eqlimit(e,c) function c2584136.eqlimit(e,c)
......
...@@ -33,7 +33,7 @@ function c25988873.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +33,7 @@ function c25988873.spop(e,tp,eg,ep,ev,re,r,rp)
if not tc then return end if not tc then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp)
or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.BreakEffect() Duel.BreakEffect()
if not Duel.Equip(tp,c,tc,false) then return end if not Duel.Equip(tp,c,tc,false) then return end
......
--捕食植物プテロペンテス --捕食植物プテロペンテス
function c26308721.initial_effect(c) function c26308721.initial_effect(c)
--counter --counter
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -41,7 +41,7 @@ function c2645637.spfilter(c) ...@@ -41,7 +41,7 @@ function c2645637.spfilter(c)
return c:GetSummonLocation()==LOCATION_GRAVE return c:GetSummonLocation()==LOCATION_GRAVE
end end
function c2645637.atkcon2(e,tp,eg,ep,ev,re,r,rp) function c2645637.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c2645637.spfilter,1,nil) and not eg:IsContains(e:GetHandler()) return eg:IsExists(c2645637.spfilter,1,nil) and not eg:IsContains(e:GetHandler())
and not (re and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) and not (re and re:IsActivated() and re:IsActiveType(TYPE_MONSTER)
and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_GRAVE) and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_GRAVE)
end end
......
...@@ -39,7 +39,7 @@ function c26640671.initial_effect(c) ...@@ -39,7 +39,7 @@ function c26640671.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c26640671.filter(c,ec) function c26640671.filter(c,ec)
return c:IsFaceup() and not ec:IsHasCardTarget(c) and c:IsRace(RACE_INSECT) return c:IsFaceup() and not ec:IsHasCardTarget(c) and c:IsRace(RACE_INSECT)
end end
function c26640671.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c26640671.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c26640671.filter(chkc,e:GetHandler()) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c26640671.filter(chkc,e:GetHandler()) end
......
...@@ -18,7 +18,7 @@ function c27174286.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,7 +18,7 @@ function c27174286.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function c27174286.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c27174286.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c27174286.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c27174286.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end end
......
...@@ -51,7 +51,7 @@ end ...@@ -51,7 +51,7 @@ end
function c27407330.rmop(e,tp,eg,ep,ev,re,r,rp) function c27407330.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c27407330.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c27407330.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
...@@ -24,7 +24,7 @@ function c282886.filter(c,e,tp) ...@@ -24,7 +24,7 @@ function c282886.filter(c,e,tp)
return c:IsSetCard(0x74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsSetCard(0x74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c282886.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c282886.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c282886.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c282886.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -15,7 +15,7 @@ function c28649820.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c28649820.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end end
function c28649820.target(e,tp,eg,ep,ev,re,r,rp,chk) function c28649820.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,28649820,0,0x11,1600,1800,4,RACE_REPTILE,ATTRIBUTE_EARTH) end Duel.IsPlayerCanSpecialSummonMonster(tp,28649820,0,0x11,1600,1800,4,RACE_REPTILE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
......
...@@ -16,7 +16,7 @@ function c28741524.filter(c,e,tp) ...@@ -16,7 +16,7 @@ function c28741524.filter(c,e,tp)
end end
function c28741524.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c28741524.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c28741524.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c28741524.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c28741524.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c28741524.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
......
...@@ -32,7 +32,7 @@ function c29590905.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,7 @@ function c29590905.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack() Duel.NegateAttack()
local a=ga:GetFirst() local a=ga:GetFirst()
local d=gd:GetFirst() local d=gd:GetFirst()
if a:IsAttackable() and not a:IsImmuneToEffect(e) and not d:IsImmuneToEffect(e) then if a:IsAttackable() and not a:IsImmuneToEffect(e) and not d:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,d) 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
......
...@@ -27,7 +27,7 @@ function c32134638.tfilter(c,tp) ...@@ -27,7 +27,7 @@ function c32134638.tfilter(c,tp)
end end
function c32134638.negcon(e,tp,eg,ep,ev,re,r,rp) function c32134638.negcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return e:GetHandler():GetFlagEffect(32134638)==0 and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) return e:GetHandler():GetFlagEffect(32134638)==0 and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
and g and g:IsExists(c32134638.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev) and g and g:IsExists(c32134638.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev)
end end
function c32134638.negop(e,tp,eg,ep,ev,re,r,rp) function c32134638.negop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -20,7 +20,7 @@ function c32362575.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,7 +20,7 @@ function c32362575.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
local spcard=nil local spcard=nil
while tc do while tc do
if tc:GetSequence()>seq then if tc:GetSequence()>seq then
seq=tc:GetSequence() seq=tc:GetSequence()
spcard=tc spcard=tc
end end
......
...@@ -19,7 +19,7 @@ function c32603633.filter(c,e,tp) ...@@ -19,7 +19,7 @@ function c32603633.filter(c,e,tp)
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetCode()) and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetCode())
end end
function c32603633.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c32603633.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c32603633.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c32603633.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
......
...@@ -20,7 +20,7 @@ function c3280747.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,7 +20,7 @@ function c3280747.activate(e,tp,eg,ep,ev,re,r,rp)
local p=1 local p=1
for i=1,6 do t[i]=i end for i=1,6 do t[i]=i end
local a1=Duel.AnnounceNumber(tp,table.unpack(t)) local a1=Duel.AnnounceNumber(tp,table.unpack(t))
for i=1,6 do for i=1,6 do
if a1~=i then t[p]=i p=p+1 end if a1~=i then t[p]=i p=p+1 end
end end
t[p]=nil t[p]=nil
......
...@@ -44,7 +44,7 @@ function c33491462.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,7 +44,7 @@ function c33491462.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c33491462.spop(e,tp,eg,ep,ev,re,r,rp) function c33491462.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and c:IsRelateToEffect(e) then if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33491462.spfilter,tp,LOCATION_HAND,0,1,1,c,e,tp) local g=Duel.SelectMatchingCard(tp,c33491462.spfilter,tp,LOCATION_HAND,0,1,1,c,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -68,6 +68,6 @@ function c34822850.atlimit(e,c) ...@@ -68,6 +68,6 @@ function c34822850.atlimit(e,c)
return c:IsFaceup() and c:IsSetCard(0xbb) and Duel.IsExistingMatchingCard(c34822850.filter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel()) return c:IsFaceup() and c:IsSetCard(0xbb) and Duel.IsExistingMatchingCard(c34822850.filter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel())
end end
function c34822850.tglimit(e,c) function c34822850.tglimit(e,c)
return c:IsSetCard(0xbb) return c:IsSetCard(0xbb)
and Duel.IsExistingMatchingCard(c34822850.filter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel()) and Duel.IsExistingMatchingCard(c34822850.filter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel())
end end
...@@ -53,7 +53,7 @@ function c3580032.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,7 +53,7 @@ function c3580032.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetTarget(c3580032.splimit) e1:SetTarget(c3580032.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c3580032.splimit(e,c,sump,sumtype,sumpos,targetp,se) function c3580032.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x107a) return not c:IsSetCard(0x107a)
end end
...@@ -64,7 +64,7 @@ function c3580032.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,7 +64,7 @@ function c3580032.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.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c3580032.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c3580032.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c3580032.spop(e,tp,eg,ep,ev,re,r,rp) function c3580032.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -82,7 +82,7 @@ function c36006208.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -82,7 +82,7 @@ function c36006208.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,3,e:GetHandler()) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c36006208.activate(e,tp,eg,ep,ev,re,r,rp) function c36006208.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local sg=g:Filter(Card.IsRelateToEffect,nil,e)
......
...@@ -25,7 +25,7 @@ function c368382.tfilter(c,tp) ...@@ -25,7 +25,7 @@ function c368382.tfilter(c,tp)
end end
function c368382.negcon(e,tp,eg,ep,ev,re,r,rp) function c368382.negcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return e:GetHandler():GetFlagEffect(368382)==0 and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) return e:GetHandler():GetFlagEffect(368382)==0 and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
and g and g:IsExists(c368382.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev) and g and g:IsExists(c368382.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev)
end end
function c368382.negop(e,tp,eg,ep,ev,re,r,rp) function c368382.negop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -38,7 +38,7 @@ function c36870345.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c36870345.spop(e,tp,eg,ep,ev,re,r,rp)
if not tc then return end if not tc then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp)
or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.BreakEffect() Duel.BreakEffect()
if not Duel.Equip(tp,c,tc,false) then return end if not Duel.Equip(tp,c,tc,false) then return end
......
...@@ -14,7 +14,7 @@ function c37198732.cfilter(c) ...@@ -14,7 +14,7 @@ function c37198732.cfilter(c)
return c:GetLevel()>0 and c:IsAbleToGraveAsCost() return c:GetLevel()>0 and c:IsAbleToGraveAsCost()
end end
function c37198732.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c37198732.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if Duel.IsExistingMatchingCard(c37198732.cfilter,tp,LOCATION_HAND,0,1,nil) then if Duel.IsExistingMatchingCard(c37198732.cfilter,tp,LOCATION_HAND,0,1,nil) then
e:SetLabel(1) e:SetLabel(1)
return true return true
......
...@@ -3,5 +3,5 @@ function c37626500.initial_effect(c) ...@@ -3,5 +3,5 @@ function c37626500.initial_effect(c)
aux.AddRitualProcEqual2(c,c37626500.ritual_filter) aux.AddRitualProcEqual2(c,c37626500.ritual_filter)
end end
function c37626500.ritual_filter(c) function c37626500.ritual_filter(c)
return c:IsType(TYPE_RITUAL) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsType(TYPE_RITUAL) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
...@@ -22,7 +22,7 @@ function c38538445.initial_effect(c) ...@@ -22,7 +22,7 @@ function c38538445.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c38538445.condition(e,tp,eg,ep,ev,re,r,rp) function c38538445.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp return ep~=tp
end end
function c38538445.target(e,tp,eg,ep,ev,re,r,rp,chk) function c38538445.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -32,7 +32,7 @@ function c38891741.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,7 +32,7 @@ function c38891741.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c38891741.activate(e,tp,eg,ep,ev,re,r,rp) function c38891741.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateActivation(ev) then return end if not Duel.NegateActivation(ev) then return end
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
...@@ -28,7 +28,7 @@ function c38988538.tfilter(c,tp) ...@@ -28,7 +28,7 @@ function c38988538.tfilter(c,tp)
end end
function c38988538.negcon(e,tp,eg,ep,ev,re,r,rp) function c38988538.negcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return e:GetHandler():GetFlagEffect(38988538)==0 and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) return e:GetHandler():GetFlagEffect(38988538)==0 and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
and g and g:IsExists(c38988538.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev) and g and g:IsExists(c38988538.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev)
end end
function c38988538.negop(e,tp,eg,ep,ev,re,r,rp) function c38988538.negop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -56,7 +56,7 @@ function c39712330.activate1(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c39712330.activate1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c39712330.filter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c39712330.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
if tc:IsSummonable(true,nil) and (not tc:IsMSetable(true,nil) if tc:IsSummonable(true,nil) and (not tc:IsMSetable(true,nil)
or Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) then or Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) then
Duel.Summon(tp,tc,true,nil) Duel.Summon(tp,tc,true,nil)
else Duel.MSet(tp,tc,true,nil) end else Duel.MSet(tp,tc,true,nil) end
......
...@@ -25,7 +25,7 @@ function c39829561.filter(c) ...@@ -25,7 +25,7 @@ function c39829561.filter(c)
return c:IsFaceup() and c:IsCode(83986578) return c:IsFaceup() and c:IsCode(83986578)
end end
function c39829561.condition(e,tp,eg,ep,ev,re,r,rp) function c39829561.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c39829561.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c39829561.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
function c39829561.target(e,tp,eg,ep,ev,re,r,rp,chk) function c39829561.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -41,6 +41,6 @@ function c4064256.sumlimit(e,c,tp,sumtp) ...@@ -41,6 +41,6 @@ function c4064256.sumlimit(e,c,tp,sumtp)
end end
function c4064256.condition(e) function c4064256.condition(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY) return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY)
and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_NECRO_VALLEY) and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_NECRO_VALLEY)
end end
...@@ -35,7 +35,7 @@ function c41158734.spfilter(c,e,tp) ...@@ -35,7 +35,7 @@ function c41158734.spfilter(c,e,tp)
end end
function c41158734.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c41158734.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c41158734.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c41158734.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c41158734.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c41158734.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c41158734.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c41158734.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -16,7 +16,7 @@ function c4192696.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c4192696.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and 1-tp==rp and bit.band(r,REASON_EFFECT)~=0 return ep==tp and 1-tp==rp and bit.band(r,REASON_EFFECT)~=0
end end
function c4192696.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c4192696.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ev) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ev)
......
...@@ -57,7 +57,7 @@ function c41999284.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -57,7 +57,7 @@ function c41999284.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c41999284.spop(e,tp,eg,ep,ev,re,r,rp) function c41999284.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then 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
end end
...@@ -67,7 +67,7 @@ function c42256406.defcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -67,7 +67,7 @@ function c42256406.defcost(e,tp,eg,ep,ev,re,r,rp,chk)
table.insert(ct,i) table.insert(ct,i)
end end
end end
if #ct==1 then if #ct==1 then
Duel.DiscardDeck(tp,ct[1],REASON_COST) Duel.DiscardDeck(tp,ct[1],REASON_COST)
e:SetLabel(1) e:SetLabel(1)
else else
......
...@@ -26,7 +26,7 @@ function c42793609.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,7 +26,7 @@ function c42793609.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst() local tc=g:GetFirst()
local sc=g:GetNext() local sc=g:GetNext()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) if tc:IsFacedown() or not tc:IsRelateToEffect(e)
or sc:IsFacedown() or not sc:IsRelateToEffect(e) then return end or sc:IsFacedown() or not sc:IsRelateToEffect(e) then return end
local ac=e:GetLabelObject() local ac=e:GetLabelObject()
if tc==ac then tc=sc end if tc==ac then tc=sc end
......
...@@ -17,7 +17,7 @@ function c43114901.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c43114901.thcon(e,tp,eg,ep,ev,re,r,rp)
if not aux.IsDualState(e) then return false end if not aux.IsDualState(e) then return false end
local tc=eg:GetFirst() local tc=eg:GetFirst()
return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler() return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler()
and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE)
end end
function c43114901.filter(c) function c43114901.filter(c)
return c:IsSetCard(0x1047) and c:IsAbleToHand() return c:IsSetCard(0x1047) and c:IsAbleToHand()
......
...@@ -32,7 +32,7 @@ function c43641473.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,7 @@ function c43641473.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc==ec then tc=g:GetNext() end if tc==ec then tc=g:GetNext() end
if ec:IsFaceup() and ec:IsRelateToEffect(e) then if ec:IsFaceup() and ec:IsRelateToEffect(e) then
Duel.Equip(tp,ec,tc) Duel.Equip(tp,ec,tc)
end end
end end
...@@ -42,7 +42,7 @@ function c44330098.sumcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function c44330098.sumcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and 1-tp==rp and not Duel.IsExistingMatchingCard(c44330098.filter,tp,LOCATION_ONFIELD,0,1,nil) return ep==tp and 1-tp==rp and not Duel.IsExistingMatchingCard(c44330098.filter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c44330098.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function c44330098.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
......
...@@ -15,7 +15,7 @@ end ...@@ -15,7 +15,7 @@ end
function c44689688.spcon(e,tp,eg,ep,ev,re,r,rp) function c44689688.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler() return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler()
and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE)
end end
function c44689688.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c44689688.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -80,7 +80,7 @@ end ...@@ -80,7 +80,7 @@ end
function c44944304.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c44944304.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp)
and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c44944304.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c44944304.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c44944304.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c44944304.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -17,7 +17,7 @@ function c45305419.initial_effect(c) ...@@ -17,7 +17,7 @@ function c45305419.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c45305419.filter(c,e,tp) function c45305419.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,2,c,c:GetCode()) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,2,c,c:GetCode())
end end
function c45305419.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c45305419.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
--レッド・ウルフ --レッド・ウルフ
function c45313993.initial_effect(c) function c45313993.initial_effect(c)
--summon success --summon success
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -52,7 +52,7 @@ function c45383307.drfilter(c) ...@@ -52,7 +52,7 @@ function c45383307.drfilter(c)
return c:IsSetCard(0xe2) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0xe2) and c:IsType(TYPE_MONSTER)
end end
function c45383307.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c45383307.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c45383307.drfilter,1,nil) if chk==0 then return eg:IsExists(c45383307.drfilter,1,nil)
and Duel.IsPlayerCanDraw(tp,1) end and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
--紋章獣ユニコーン --紋章獣ユニコーン
function c45705025.initial_effect(c) function c45705025.initial_effect(c)
--revive --revive
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45705025,0)) e1:SetDescription(aux.Stringid(45705025,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
...@@ -81,7 +81,7 @@ function c46035545.pfilter(c) ...@@ -81,7 +81,7 @@ function c46035545.pfilter(c)
end end
function c46035545.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c46035545.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c46035545.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c46035545.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c46035545.thfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c46035545.thfilter,tp,LOCATION_MZONE,0,1,nil)
and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c46035545.pfilter,tp,LOCATION_EXTRA,0,1,nil) end and Duel.IsExistingMatchingCard(c46035545.pfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -15,7 +15,7 @@ end ...@@ -15,7 +15,7 @@ end
function c46609443.spcon(e,tp,eg,ep,ev,re,r,rp) function c46609443.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler() return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler()
and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE)
end end
function c46609443.filter(c,e,tp) function c46609443.filter(c,e,tp)
return c:IsAttackBelow(1600) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(1600) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -76,7 +76,7 @@ function c46647144.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +76,7 @@ function c46647144.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 or Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,46647145,0xfe,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) or not Duel.IsPlayerCanSpecialSummonMonster(tp,46647145,0xfe,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,46647145,0xfe,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) or not Duel.IsPlayerCanSpecialSummonMonster(tp,46647145,0xfe,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp)
or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local token1=Duel.CreateToken(tp,46647145) local token1=Duel.CreateToken(tp,46647145)
local token2=Duel.CreateToken(tp,46647145) local token2=Duel.CreateToken(tp,46647145)
......
...@@ -32,7 +32,7 @@ function c47171541.cfilter(c) ...@@ -32,7 +32,7 @@ function c47171541.cfilter(c)
end end
function c47171541.target(e,tp,eg,ep,ev,re,r,rp,chk) function c47171541.target(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==1 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local res=e:GetLabel()==1 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then if chk==0 then
e:SetLabel(0) e:SetLabel(0)
return res and Duel.IsExistingTarget(c47171541.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) return res and Duel.IsExistingTarget(c47171541.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end end
......
...@@ -11,7 +11,7 @@ function c48356796.initial_effect(c) ...@@ -11,7 +11,7 @@ function c48356796.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DRAW_COUNT) e2:SetCode(EFFECT_DRAW_COUNT)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
e2:SetValue(2) e2:SetValue(2)
e2:SetCondition(c48356796.drawcon) e2:SetCondition(c48356796.drawcon)
......
...@@ -16,7 +16,7 @@ function c50584941.cfilter(c,tp) ...@@ -16,7 +16,7 @@ function c50584941.cfilter(c,tp)
and Duel.IsExistingTarget(c50584941.filter,tp,LOCATION_MZONE,0,1,nil,code) and Duel.IsExistingTarget(c50584941.filter,tp,LOCATION_MZONE,0,1,nil,code)
end end
function c50584941.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c50584941.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if Duel.IsExistingMatchingCard(c50584941.cfilter,tp,LOCATION_GRAVE,0,1,nil,tp) then if Duel.IsExistingMatchingCard(c50584941.cfilter,tp,LOCATION_GRAVE,0,1,nil,tp) then
e:SetLabel(1) e:SetLabel(1)
return true return true
......
...@@ -16,7 +16,7 @@ function c50613779.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c50613779.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_EFFECT)~=0 return ep==tp and bit.band(r,REASON_EFFECT)~=0
end end
function c50613779.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c50613779.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
......
...@@ -26,7 +26,7 @@ function c50669347.desfilter(c,e,tp,g) ...@@ -26,7 +26,7 @@ function c50669347.desfilter(c,e,tp,g)
and Duel.IsExistingMatchingCard(c50669347.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) and Duel.IsExistingMatchingCard(c50669347.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c)
end end
function c50669347.spfilter(c,e,tp,dc) function c50669347.spfilter(c,e,tp,dc)
return c:IsSetCard(0x11f) and c:IsType(TYPE_MONSTER) and not c:IsOriginalCodeRule(dc:GetOriginalCodeRule()) return c:IsSetCard(0x11f) and c:IsType(TYPE_MONSTER) and not c:IsOriginalCodeRule(dc:GetOriginalCodeRule())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c50669347.target(e,tp,eg,ep,ev,re,r,rp,chk) function c50669347.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -14,7 +14,7 @@ function c50781944.initial_effect(c) ...@@ -14,7 +14,7 @@ function c50781944.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c50781944.filter(c,tp) function c50781944.filter(c,tp)
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and
c:GetPreviousControler()==tp and c:IsType(TYPE_MONSTER) c:GetPreviousControler()==tp and c:IsType(TYPE_MONSTER)
end end
function c50781944.reccon(e,tp,eg,ep,ev,re,r,rp) function c50781944.reccon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -36,7 +36,7 @@ function c52035300.filter(c) ...@@ -36,7 +36,7 @@ function c52035300.filter(c)
end end
function c52035300.condition(e,tp,eg,ep,ev,re,r,rp) function c52035300.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and not Duel.IsExistingMatchingCard(c52035300.filter,tp,LOCATION_GRAVE,0,1,nil) and not Duel.IsExistingMatchingCard(c52035300.filter,tp,LOCATION_GRAVE,0,1,nil)
end end
function c52035300.target(e,tp,eg,ep,ev,re,r,rp,chk) function c52035300.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -39,7 +39,7 @@ function c52977572.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c52977572.spop(e,tp,eg,ep,ev,re,r,rp)
if not tc then return end if not tc then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp)
or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.BreakEffect() Duel.BreakEffect()
if not Duel.Equip(tp,c,tc,false) then return end if not Duel.Equip(tp,c,tc,false) then return end
......
...@@ -27,7 +27,7 @@ function c53291093.spfilter(c,e,tp) ...@@ -27,7 +27,7 @@ function c53291093.spfilter(c,e,tp)
end end
function c53291093.activate(e,tp,eg,ep,ev,re,r,rp) function c53291093.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g=Duel.GetMatchingGroup(c53291093.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c53291093.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(53291093,0)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(53291093,0)) then
......
...@@ -90,7 +90,7 @@ function c54451023.eqlimit(e,c) ...@@ -90,7 +90,7 @@ function c54451023.eqlimit(e,c)
return c:GetControler()==e:GetOwnerPlayer() and c:IsRace(RACE_PLANT) return c:GetControler()==e:GetOwnerPlayer() and c:IsRace(RACE_PLANT)
end end
function c54451023.spcon(e,tp,eg,ep,ev,re,r,rp) function c54451023.spcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetReason(),REASON_EFFECT+REASON_DESTROY)==REASON_EFFECT+REASON_DESTROY return bit.band(e:GetHandler():GetReason(),REASON_EFFECT+REASON_DESTROY)==REASON_EFFECT+REASON_DESTROY
and e:GetHandler():GetEquipTarget() and e:GetHandler():GetEquipTarget()
end end
function c54451023.spfilter(c,e,tp) function c54451023.spfilter(c,e,tp)
......
...@@ -26,7 +26,7 @@ function c54913680.spfilter(c,e,tp) ...@@ -26,7 +26,7 @@ function c54913680.spfilter(c,e,tp)
end end
function c54913680.target(e,tp,eg,ep,ev,re,r,rp,chk) function c54913680.target(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==1 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local res=e:GetLabel()==1 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then if chk==0 then
e:SetLabel(0) e:SetLabel(0)
return res and Duel.IsExistingMatchingCard(c54913680.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) return res and Duel.IsExistingMatchingCard(c54913680.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end end
......
...@@ -30,7 +30,7 @@ function c5592689.filter(c) ...@@ -30,7 +30,7 @@ function c5592689.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c5592689.sscon(e,tp,eg,ep,ev,re,r,rp) function c5592689.sscon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c5592689.filter,tp,LOCATION_ONFIELD,0,1,nil) return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c5592689.filter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c5592689.sstg(e,tp,eg,ep,ev,re,r,rp,chk) function c5592689.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -28,7 +28,7 @@ end ...@@ -28,7 +28,7 @@ end
function c56535497.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c56535497.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return true end if chk==0 then return true end
if Duel.GetCurrentPhase()==PHASE_DAMAGE or if Duel.GetCurrentPhase()==PHASE_DAMAGE or
(Duel.IsExistingTarget(c56535497.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) and Duel.SelectYesNo(tp,aux.Stringid(56535497,0))) then (Duel.IsExistingTarget(c56535497.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) and Duel.SelectYesNo(tp,aux.Stringid(56535497,0))) then
e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(56535497,2)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(56535497,2))
...@@ -37,7 +37,7 @@ function c56535497.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -37,7 +37,7 @@ function c56535497.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(56535497,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(56535497,3))
Duel.SelectTarget(tp,c56535497.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,rg:GetFirst()) Duel.SelectTarget(tp,c56535497.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,rg:GetFirst())
e:GetHandler():RegisterFlagEffect(56535497,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(56535497,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
else else
e:SetLabelObject(nil) e:SetLabelObject(nil)
e:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
end end
......
...@@ -16,7 +16,7 @@ function c57019473.filter(c) ...@@ -16,7 +16,7 @@ function c57019473.filter(c)
and c:GetCode()~=57019473 and c:IsAttackBelow(1600) and c:IsAbleToRemove() and c:GetCode()~=57019473 and c:IsAttackBelow(1600) and c:IsAbleToRemove()
end end
function c57019473.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c57019473.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c57019473.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c57019473.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c57019473.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c57019473.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c57019473.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c57019473.filter,tp,LOCATION_GRAVE,0,1,1,nil)
......
...@@ -19,7 +19,7 @@ function c57409948.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,7 +19,7 @@ function c57409948.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then
Duel.ConfirmCards(tp,tc) Duel.ConfirmCards(tp,tc)
if tc:IsType(TYPE_EFFECT) then if tc:IsType(TYPE_EFFECT) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment