Commit a715903e authored by DailyShana's avatar DailyShana

fix (80/80)

parent b2e885b7
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c31472884.initial_effect(c) function c31472884.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -31,41 +31,38 @@ function c31472884.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,41 +31,38 @@ function c31472884.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c31472884.cfilter(c) function c31472884.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable() return c:IsType(TYPE_MONSTER) and c:IsDiscardable() and c:GetAttack()>=0 and c:GetDefence()>=0
and Duel.IsExistingTarget(c31472884.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c)
end
function c31472884.tgfilter(c,dc)
return c:IsFaceup() and (c:GetAttack()~=dc:GetAttack() or c:GetDefence()~=dc:GetDefence())
end end
function c31472884.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c31472884.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.IsExistingMatchingCard(c31472884.cfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.GetFlagEffect(tp,31472884)==0 then
e:SetLabel(1) e:SetLabel(1)
return true return true
else end
return false function c31472884.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and c31472884.tgfilter(chkc,e:GetLabelObject()) end
if chk==0 then
if e:GetLabel()~=1 then return false end
e:SetLabel(0)
return Duel.GetFlagEffect(tp,31472884)==0
and Duel.IsExistingMatchingCard(c31472884.cfilter,tp,LOCATION_HAND,0,1,nil)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c31472884.cfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c31472884.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,c31472884.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g:GetFirst())
e:SetLabelObject(g:GetFirst()) e:SetLabelObject(g:GetFirst())
g:GetFirst():CreateEffectRelation(e)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(1,0) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c31472884.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
if e:GetLabel()~=1 then return false end
e:SetLabel(0)
return 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)
end
function c31472884.activate(e,tp,eg,ep,ev,re,r,rp) function c31472884.activate(e,tp,eg,ep,ev,re,r,rp)
local cc=e:GetLabelObject() local cc=e:GetLabelObject()
local atk=cc:GetAttack() local atk=cc:GetAttack()
......
...@@ -25,7 +25,6 @@ function c32104431.costfilter(c) ...@@ -25,7 +25,6 @@ function c32104431.costfilter(c)
return c:IsSetCard(0xd6) and c:IsDiscardable() return c:IsSetCard(0xd6) and c:IsDiscardable()
end end
function c32104431.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c32104431.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return Duel.IsExistingMatchingCard(c32104431.costfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c32104431.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c32104431.costfilter,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,c32104431.costfilter,1,1,REASON_COST+REASON_DISCARD)
end end
...@@ -33,12 +32,8 @@ function c32104431.spfilter(c,e,tp) ...@@ -33,12 +32,8 @@ function c32104431.spfilter(c,e,tp)
return c:IsSetCard(0xd7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xd7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c32104431.target(e,tp,eg,ep,ev,re,r,rp,chk) function c32104431.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end and Duel.IsExistingMatchingCard(c32104431.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c32104431.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
e:SetLabel(0)
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 c32104431.operation(e,tp,eg,ep,ev,re,r,rp) function c32104431.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -49,7 +49,7 @@ function c33327029.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +49,7 @@ function c33327029.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c33327029.thfilter(c) function c33327029.thfilter(c)
return c:IsSetCard(0xe1) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xe1) and c:IsAbleToHand()
end end
function c33327029.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c33327029.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33327029.thfilter,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c33327029.thfilter,tp,LOCATION_EXTRA,0,1,nil) end
......
...@@ -10,31 +10,39 @@ function c34449261.initial_effect(c) ...@@ -10,31 +10,39 @@ function c34449261.initial_effect(c)
e1:SetOperation(c34449261.activate) e1:SetOperation(c34449261.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c34449261.filter1(c,tp,chk) function c34449261.filter1(c,tp)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsSetCard(0xad) and ((not chk) return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsSetCard(0xad)
or Duel.IsExistingTarget(c34449261.filter2,tp,0,LOCATION_MZONE,1,nil)) and Duel.IsExistingTarget(c34449261.filter2,tp,0,LOCATION_MZONE,1,nil,tp,c)
end end
function c34449261.filter2(c,tp,ex2) function c34449261.filter2(c,tp,tc)
local tg=Group.FromCards(c,tc)
return c:IsFaceup() and c:IsType(TYPE_FUSION) return c:IsFaceup() and c:IsType(TYPE_FUSION)
and Duel.IsExistingMatchingCard(c34449261.filter3,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,ex2) and Duel.IsExistingMatchingCard(c34449261.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tg)
end end
function c34449261.filter3(c,ex2) function c34449261.desfilter(c,tg)
return c~=ex2 and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsDestructable() return not tg:IsContains(c) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsDestructable()
end end
function c34449261.target(e,tp,eg,ep,ev,re,r,rp,chk) function c34449261.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c34449261.filter1,tp,LOCATION_MZONE,0,1,nil,tp,true) end if chkc then return false end
local g1=Duel.SelectTarget(tp,c34449261.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp,false) if chk==0 then return Duel.IsExistingTarget(c34449261.filter1,tp,LOCATION_MZONE,0,1,nil,tp) end
local g1=Duel.SelectTarget(tp,c34449261.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
local g2=Duel.SelectTarget(tp,c34449261.filter2,tp,0,LOCATION_MZONE,1,1,nil,tp,g1:GetFirst()) local g2=Duel.SelectTarget(tp,c34449261.filter2,tp,0,LOCATION_MZONE,1,1,nil,tp,g1:GetFirst())
local g3=Duel.GetMatchingGroup(c34449261.filter3,tp,LOCATION_MZONE,LOCATION_MZONE,g1:GetFirst(),g2:GetFirst()) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g3,g3:GetCount(),0,0) local g=Duel.GetMatchingGroup(c34449261.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,g1)
local dam=g3:GetSum(Card.GetAttack) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
if g3:FilterCount(Card.IsControler,nil,tp)>0 then Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,dam) end local dam=g1:GetSum(Card.GetAttack)
if g3:FilterCount(Card.IsControler,nil,1-tp)>0 then Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) end if g:FilterCount(Card.IsControler,nil,1-tp)==0 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,dam)
elseif g:FilterCount(Card.IsControler,nil,tp)==0 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
else
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,dam)
end
end end
function c34449261.activate(e,tp,eg,ep,ev,re,r,rp) function c34449261.activate(e,tp,eg,ep,ev,re,r,rp)
local tc1,tc2=Duel.GetFirstTarget() local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local dam=tc1:GetAttack()+tc2:GetAttack() local dam=tg:Filter(Card.IsFaceup,nil):GetSum(Card.GetAttack)
local g=Duel.GetMatchingGroup(c34449261.filter3,tp,LOCATION_MZONE,LOCATION_MZONE,tc1,tc2) local g=Duel.GetMatchingGroup(c34449261.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tg)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
local dg=Duel.GetOperatedGroup() local dg=Duel.GetOperatedGroup()
if dg:IsExists(aux.FilterEqualFunction(Card.GetPreviousControler,tp),1,nil) then Duel.Damage(tp,dam,REASON_EFFECT) end if dg:IsExists(aux.FilterEqualFunction(Card.GetPreviousControler,tp),1,nil) then Duel.Damage(tp,dam,REASON_EFFECT) end
......
...@@ -69,7 +69,7 @@ function c45383307.thfilter(c) ...@@ -69,7 +69,7 @@ function c45383307.thfilter(c)
end end
function c45383307.thcon(e,tp,eg,ep,ev,re,r,rp) function c45383307.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousSequence()==5 and c:IsPreviousPosition(POS_FACEUP) return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()==5 and c:IsPreviousPosition(POS_FACEUP)
end end
function c45383307.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c45383307.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c45383307.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c45383307.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -23,16 +23,17 @@ end ...@@ -23,16 +23,17 @@ end
function c60433216.activate(e,tp,eg,ep,ev,re,r,rp) function c60433216.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
local e1=Effect.CreateEffect(e:GetHandler()) if not tc or not tc:IsRelateToBattle() then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE) e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,60433216,0,0x11,0,0,1,RACE_FIEND,ATTRIBUTE_FIRE) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,60433216,0,0x1011,0,0,1,RACE_FIEND,ATTRIBUTE_FIRE) then return end
c:AddTrapMonsterAttribute(TYPE_NORMAL+TYPE_TUNER,ATTRIBUTE_FIRE,RACE_FIEND,1,0,0) c:AddTrapMonsterAttribute(TYPE_NORMAL+TYPE_TUNER,ATTRIBUTE_FIRE,RACE_FIEND,1,0,0)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
c:TrapMonsterBlock() c:TrapMonsterBlock()
......
...@@ -16,17 +16,15 @@ function c69599136.initial_effect(c) ...@@ -16,17 +16,15 @@ function c69599136.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c69599136.filter(c,tp) function c69599136.filter(c,tp)
return c:IsFaceup() and c:GetSummonPlayer()~=tp return c:IsFaceup() and c:GetSummonPlayer()~=tp and c:IsCanTurnSet()
end end
function c69599136.target(e,tp,eg,ep,ev,re,r,rp,chk) function c69599136.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c69599136.filter,1,nil,tp) end if chk==0 then return eg:IsExists(c69599136.filter,1,nil,tp) end
Duel.SetTargetCard(eg) local g=eg:Filter(c69599136.filter,1,nil,tp)
end Duel.SetTargetCard(g)
function c69599136.filter2(c,e,tp)
return c:IsFaceup() and c:GetSummonPlayer()~=tp and c:IsRelateToEffect(e)
end end
function c69599136.activate(e,tp,eg,ep,ev,re,r,rp) function c69599136.activate(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c69599136.filter2,nil,e,tp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE)~=0 then if Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE)~=0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local tc=og:GetFirst() local tc=og:GetFirst()
......
...@@ -47,8 +47,7 @@ function c69711728.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,8 +47,7 @@ function c69711728.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c69711728.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c69711728.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c69711728.filter(chkc,eg:GetFirst():GetLevel(),e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c69711728.filter(chkc,eg:GetFirst():GetLevel(),e,tp) end
if chk==0 then return e:GetHandler():IsLocation(LOCATION_SZONE) if chk==0 then return eg:IsExists(c69711728.cfilter,1,nil,e,tp)
and eg:IsExists(c69711728.cfilter,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c69711728.filter,tp,LOCATION_GRAVE,0,1,1,nil,eg:GetFirst():GetLevel(),e,tp) local g=Duel.SelectTarget(tp,c69711728.filter,tp,LOCATION_GRAVE,0,1,1,nil,eg:GetFirst():GetLevel(),e,tp)
......
...@@ -15,7 +15,7 @@ function c7044562.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -15,7 +15,7 @@ function c7044562.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
function c7044562.filter(c,lp) function c7044562.filter(c,lp)
return c:GetAttack()+c:GetDefence()==lp and c:IsAbleToHand() return c:GetAttack()>0 and c:GetDefence()>0 and c:GetAttack()+c:GetDefence()==lp and c:IsAbleToHand()
end end
function c7044562.activate(e,tp,eg,ep,ev,re,r,rp) function c7044562.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
......
...@@ -35,7 +35,7 @@ function c71650854.initial_effect(c) ...@@ -35,7 +35,7 @@ function c71650854.initial_effect(c)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_FZONE) e6:SetRange(LOCATION_FZONE)
e6:SetTargetRange(1,0) e6:SetTargetRange(1,0)
e6:SetTarget(c71650854.efilter1) e6:SetTarget(c71650854.setlimit)
c:RegisterEffect(e6) c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD) e7:SetType(EFFECT_TYPE_FIELD)
...@@ -43,7 +43,7 @@ function c71650854.initial_effect(c) ...@@ -43,7 +43,7 @@ function c71650854.initial_effect(c)
e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e7:SetRange(LOCATION_FZONE) e7:SetRange(LOCATION_FZONE)
e7:SetTargetRange(1,0) e7:SetTargetRange(1,0)
e7:SetValue(c71650854.efilter2) e7:SetValue(c71650854.actlimit)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c71650854.condition(e,tp,eg,ep,ev,re,r,rp) function c71650854.condition(e,tp,eg,ep,ev,re,r,rp)
...@@ -62,9 +62,9 @@ end ...@@ -62,9 +62,9 @@ end
function c71650854.tgovalue(e,re,rp) function c71650854.tgovalue(e,re,rp)
return rp~=1-e:GetHandlerPlayer() return rp~=1-e:GetHandlerPlayer()
end end
function c71650854.efilter1(e,re,tp) function c71650854.setlimit(e,c,tp)
return re:IsType(TYPE_FIELD) return c:IsType(TYPE_FIELD)
end end
function c71650854.efilter2(e,re,tp) function c71650854.actlimit(e,re,tp)
return re:GetHandler():IsType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
...@@ -40,7 +40,7 @@ function c72772445.actfilter(c,tp) ...@@ -40,7 +40,7 @@ function c72772445.actfilter(c,tp)
return c and c:IsFaceup() and c:IsSetCard(0xe2) and c:IsType(TYPE_MONSTER) and c:IsControler(tp) return c and c:IsFaceup() and c:IsSetCard(0xe2) and c:IsType(TYPE_MONSTER) and c:IsControler(tp)
end end
function c72772445.aclimit(e,re,tp) function c72772445.aclimit(e,re,tp)
return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) and not re:GetHandler():IsImmuneToEffect(e) return not re:GetHandler():IsImmuneToEffect(e)
end end
function c72772445.actcon(e) function c72772445.actcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
...@@ -48,7 +48,7 @@ function c72772445.actcon(e) ...@@ -48,7 +48,7 @@ function c72772445.actcon(e)
end end
function c72772445.spcon(e,tp,eg,ep,ev,re,r,rp) function c72772445.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousSequence()==5 and c:IsPreviousPosition(POS_FACEUP) return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()==5 and c:IsPreviousPosition(POS_FACEUP)
end end
function c72772445.spfilter(c,e,tp) function c72772445.spfilter(c,e,tp)
return c:IsSetCard(0xe2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xe2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -37,27 +37,19 @@ function c7922915.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,27 +37,19 @@ function c7922915.target(e,tp,eg,ep,ev,re,r,rp,chk)
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 end
function c7922915.activate(e,tp,eg,ep,ev,re,r,rp) function c7922915.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if ft<=0 then return end
if ft==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c7922915.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c7922915.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
else if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c7922915.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c7922915.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g2=Duel.SelectMatchingCard(tp,c7922915.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g2:GetCount()>0 then if g2:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end end
end
end end
function c7922915.cfilter(c,e,tp) function c7922915.cfilter(c,e,tp)
return c:IsCode(46986414) and c:IsFaceup() return c:IsCode(46986414) and c:IsFaceup()
......
This diff is collapsed.
This diff is collapsed.
...@@ -38,7 +38,7 @@ function c9989792.initial_effect(c) ...@@ -38,7 +38,7 @@ function c9989792.initial_effect(c)
end end
function c9989792.thcon(e,tp,eg,ep,ev,re,r,rp) function c9989792.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousSequence()==5 and c:IsPreviousPosition(POS_FACEUP) return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()==5 and c:IsPreviousPosition(POS_FACEUP)
end end
function c9989792.thfilter(c) function c9989792.thfilter(c)
return c:IsSetCard(0xe2) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0xe2) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
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