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()
......
--涅槃の超魔導剣士 --涅槃の超魔導剣士
function c80896904.initial_effect(c) function c80896940.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c,false) aux.EnablePendulumAttribute(c,false)
--synchro summon --synchro summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(80896904,0)) e1:SetDescription(aux.Stringid(80896940,0))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
...@@ -16,10 +16,10 @@ function c80896904.initial_effect(c) ...@@ -16,10 +16,10 @@ function c80896904.initial_effect(c)
e1:SetValue(SUMMON_TYPE_SYNCHRO) e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetDescription(aux.Stringid(80896904,1)) e2:SetDescription(aux.Stringid(80896940,1))
e2:SetCondition(c80896904.syncon) e2:SetCondition(c80896940.syncon)
e2:SetTarget(c80896904.syntg) e2:SetTarget(c80896940.syntg)
e2:SetOperation(c80896904.synop) e2:SetOperation(c80896940.synop)
e2:SetValue(SUMMON_TYPE_SYNCHRO) e2:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--indes --indes
...@@ -27,68 +27,68 @@ function c80896904.initial_effect(c) ...@@ -27,68 +27,68 @@ function c80896904.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_PZONE) e3:SetRange(LOCATION_PZONE)
e3:SetCondition(c80896904.indcon) e3:SetCondition(c80896940.indcon)
e3:SetOperation(c80896904.indop) e3:SetOperation(c80896940.indop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--atkdown --atkdown
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(80896904,2)) e4:SetDescription(aux.Stringid(80896940,2))
e4:SetCategory(CATEGORY_ATKCHANGE) e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_DAMAGE_STEP_END) e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetRange(LOCATION_PZONE) e4:SetRange(LOCATION_PZONE)
e4:SetCondition(c80896904.atkcon) e4:SetCondition(c80896940.atkcon)
e4:SetOperation(c80896904.atkop) e4:SetOperation(c80896940.atkop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--salvage --salvage
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(80896904,3)) e5:SetDescription(aux.Stringid(80896940,3))
e5:SetCategory(CATEGORY_TOHAND) e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS) e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET) e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCondition(c80896904.thcon) e5:SetCondition(c80896940.thcon)
e5:SetTarget(c80896904.thtg) e5:SetTarget(c80896940.thtg)
e5:SetOperation(c80896904.thop) e5:SetOperation(c80896940.thop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK) e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c80896904.valcheck) e0:SetValue(c80896940.valcheck)
e0:SetLabelObject(e5) e0:SetLabelObject(e5)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--lp --lp
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(80896904,4)) e6:SetDescription(aux.Stringid(80896940,4))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_BATTLE_DESTROYING) e6:SetCode(EVENT_BATTLE_DESTROYING)
e6:SetCondition(aux.bdocon) e6:SetCondition(aux.bdocon)
e6:SetOperation(c80896904.lpop) e6:SetOperation(c80896940.lpop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--pendulum --pendulum
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(80896904,5)) e7:SetDescription(aux.Stringid(80896940,5))
e7:SetCategory(CATEGORY_DESTROY) e7:SetCategory(CATEGORY_DESTROY)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetCode(EVENT_DESTROYED) e7:SetCode(EVENT_DESTROYED)
e7:SetProperty(EFFECT_FLAG_DELAY) e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCondition(c80896904.pencon) e7:SetCondition(c80896940.pencon)
e7:SetTarget(c80896904.pentg) e7:SetTarget(c80896940.pentg)
e7:SetOperation(c80896904.penop) e7:SetOperation(c80896940.penop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c80896904.matfilter1(c,syncard) function c80896940.matfilter1(c,syncard)
return c:IsType(TYPE_PENDULUM) and c:GetSummonType()==SUMMON_TYPE_PENDULUM and c:IsNotTuner() and c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard) return c:IsType(TYPE_PENDULUM) and c:GetSummonType()==SUMMON_TYPE_PENDULUM and c:IsNotTuner() and c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard)
end end
function c80896904.matfilter2(c,syncard) function c80896940.matfilter2(c,syncard)
return c:IsNotTuner() and c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSynchroMaterial(syncard) return c:IsNotTuner() and c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSynchroMaterial(syncard)
end end
function c80896904.synfilter(c,syncard,lv,g2) function c80896940.synfilter(c,syncard,lv,g2)
local tlv=c:GetSynchroLevel(syncard) local tlv=c:GetSynchroLevel(syncard)
if lv-tlv<=0 then return false end if lv-tlv<=0 then return false end
return g2:CheckWithSumEqual(Card.GetSynchroLevel,lv-tlv,1,63,syncard) return g2:CheckWithSumEqual(Card.GetSynchroLevel,lv-tlv,1,63,syncard)
end end
function c80896904.syncon(e,c,tuner,mg) function c80896940.syncon(e,c,tuner,mg)
if c==nil then return true end if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler() local tp=c:GetControler()
...@@ -96,11 +96,11 @@ function c80896904.syncon(e,c,tuner,mg) ...@@ -96,11 +96,11 @@ function c80896904.syncon(e,c,tuner,mg)
local g1=nil local g1=nil
local g2=nil local g2=nil
if mg then if mg then
g1=mg:Filter(c80896904.matfilter1,nil,c) g1=mg:Filter(c80896940.matfilter1,nil,c)
g2=mg:Filter(c80896904.matfilter2,nil,c) g2=mg:Filter(c80896940.matfilter2,nil,c)
else else
g1=Duel.GetMatchingGroup(c80896904.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) g1=Duel.GetMatchingGroup(c80896940.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g2=Duel.GetMatchingGroup(c80896904.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) g2=Duel.GetMatchingGroup(c80896940.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL) local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel() local lv=c:GetLevel()
...@@ -110,21 +110,21 @@ function c80896904.syncon(e,c,tuner,mg) ...@@ -110,21 +110,21 @@ function c80896904.syncon(e,c,tuner,mg)
return g2:CheckWithSumEqual(Card.GetSynchroLevel,lv-tlv,1,63,c) return g2:CheckWithSumEqual(Card.GetSynchroLevel,lv-tlv,1,63,c)
end end
if not pe then if not pe then
return g1:IsExists(c80896904.synfilter,1,nil,c,lv,g2) return g1:IsExists(c80896940.synfilter,1,nil,c,lv,g2)
else else
return c80896904.synfilter(pe:GetOwner(),c,lv,g2) return c80896940.synfilter(pe:GetOwner(),c,lv,g2)
end end
end end
function c80896904.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg) function c80896940.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
local g=Group.CreateGroup() local g=Group.CreateGroup()
local g1=nil local g1=nil
local g2=nil local g2=nil
if mg then if mg then
g1=mg:Filter(c80896904.matfilter1,nil,c) g1=mg:Filter(c80896940.matfilter1,nil,c)
g2=mg:Filter(c80896904.matfilter2,nil,c) g2=mg:Filter(c80896940.matfilter2,nil,c)
else else
g1=Duel.GetMatchingGroup(c80896904.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) g1=Duel.GetMatchingGroup(c80896940.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g2=Duel.GetMatchingGroup(c80896904.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) g2=Duel.GetMatchingGroup(c80896940.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL) local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel() local lv=c:GetLevel()
...@@ -138,13 +138,13 @@ function c80896904.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg) ...@@ -138,13 +138,13 @@ function c80896904.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tuner=nil local tuner=nil
if not pe then if not pe then
local t1=g1:FilterSelect(tp,c80896904.synfilter,1,1,nil,c,lv,g2) local t1=g1:FilterSelect(tp,c80896940.synfilter,1,1,nil,c,lv,g2)
tuner=t1:GetFirst() tuner=t1:GetFirst()
else else
tuner=pe:GetOwner() tuner=pe:GetOwner()
Group.FromCards(tuner):Select(tp,1,1,nil) Group.FromCards(tuner):Select(tp,1,1,nil)
end end
tuner:RegisterFlagEffect(80896904,RESET_EVENT+0x1fe0000,0,1) tuner:RegisterFlagEffect(80896940,RESET_EVENT+0x1fe0000,0,1)
g:AddCard(tuner) g:AddCard(tuner)
local lv1=tuner:GetSynchroLevel(c) local lv1=tuner:GetSynchroLevel(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
...@@ -157,17 +157,17 @@ function c80896904.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg) ...@@ -157,17 +157,17 @@ function c80896904.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
return true return true
else return false end else return false end
end end
function c80896904.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg) function c80896940.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=e:GetLabelObject() local g=e:GetLabelObject()
c:SetMaterial(g) c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO) Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup() g:DeleteGroup()
end end
function c80896904.indcon(e,tp,eg,ep,ev,re,r,rp) function c80896940.indcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
return a:IsType(TYPE_PENDULUM) and a:IsControler(tp) return a:IsType(TYPE_PENDULUM) and a:IsControler(tp)
end end
function c80896904.indop(e,tp,eg,ep,ev,re,r,rp) function c80896940.indop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -182,11 +182,11 @@ function c80896904.indop(e,tp,eg,ep,ev,re,r,rp) ...@@ -182,11 +182,11 @@ function c80896904.indop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
function c80896904.atkcon(e,tp,eg,ep,ev,re,r,rp) function c80896940.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
return a and a:IsRelateToBattle() and a:IsType(TYPE_PENDULUM) and a:IsControler(tp) return a and a:IsRelateToBattle() and a:IsType(TYPE_PENDULUM) and a:IsControler(tp)
end end
function c80896904.atkop(e,tp,eg,ep,ev,re,r,rp) function c80896940.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
...@@ -201,45 +201,45 @@ function c80896904.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -201,45 +201,45 @@ function c80896904.atkop(e,tp,eg,ep,ev,re,r,rp)
tc=tg:GetNext() tc=tg:GetNext()
end end
end end
function c80896904.thcon(e,tp,eg,ep,ev,re,r,rp) function c80896940.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO and e:GetLabel()==1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO and e:GetLabel()==1
end end
function c80896904.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c80896940.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsAbleToHand() end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c80896904.thop(e,tp,eg,ep,ev,re,r,rp) function c80896940.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
function c80896904.mfilter(c) function c80896940.mfilter(c)
return c:IsType(TYPE_PENDULUM) and c:GetSummonType()==SUMMON_TYPE_PENDULUM return c:IsType(TYPE_PENDULUM) and c:GetSummonType()==SUMMON_TYPE_PENDULUM
and (c:IsType(TYPE_TUNER) or c:GetFlagEffect(80896904)~=0) and (c:IsType(TYPE_TUNER) or c:GetFlagEffect(80896940)~=0)
end end
function c80896904.valcheck(e,c) function c80896940.valcheck(e,c)
local g=c:GetMaterial() local g=c:GetMaterial()
if g:IsExists(c80896904.mfilter,1,nil) then if g:IsExists(c80896940.mfilter,1,nil) then
e:GetLabelObject():SetLabel(1) e:GetLabelObject():SetLabel(1)
else else
e:GetLabelObject():SetLabel(0) e:GetLabelObject():SetLabel(0)
end end
end end
function c80896904.lpop(e,tp,eg,ep,ev,re,r,rp) function c80896940.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/2)) Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/2))
end end
function c80896904.pencon(e,tp,eg,ep,ev,re,r,rp) function c80896940.pencon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end end
function c80896904.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c80896940.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) end
end end
function c80896904.penop(e,tp,eg,ep,ev,re,r,rp) function c80896940.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_SZONE,6) and not Duel.CheckLocation(tp,LOCATION_SZONE,7) then return false end if not Duel.CheckLocation(tp,LOCATION_SZONE,6) and not Duel.CheckLocation(tp,LOCATION_SZONE,7) then return false end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
......
...@@ -2,126 +2,154 @@ ...@@ -2,126 +2,154 @@
function c96100333.initial_effect(c) function c96100333.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96100333,0))
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0) e1:SetHintTiming(0,0x1e0)
e1:SetTarget(c96100333.target1) e1:SetTarget(c96100333.target)
e1:SetOperation(c96100333.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--instant(chain) --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(96100333,0)) e2:SetDescription(aux.Stringid(96100333,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_DRAW) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,0x1e0) e2:SetHintTiming(0,0x1e0)
e2:SetCost(c96100333.cost) e2:SetCost(c96100333.cost)
e2:SetTarget(c96100333.target2) e2:SetTarget(c96100333.destg)
e2:SetOperation(c96100333.operation) e2:SetOperation(c96100333.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(96100333,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetHintTiming(0,0x1e0)
e3:SetTarget(c96100333.sptg)
e3:SetOperation(c96100333.spop)
c:RegisterEffect(e3)
--to deck
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(96100333,3))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetHintTiming(0,0x1e0)
e4:SetTarget(c96100333.tdtg)
e4:SetOperation(c96100333.tdop)
c:RegisterEffect(e4)
end end
function c96100333.cfilter(c) function c96100333.cfilter(c)
return (c:IsRace(RACE_ROCK) or c:IsType(TYPE_FIELD)) and c:IsAbleToRemoveAsCost() return (c:IsRace(RACE_ROCK) or c:IsType(TYPE_FIELD)) and c:IsAbleToRemoveAsCost()
end end
function c96100333.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(96100333)==0
and Duel.IsExistingMatchingCard(c96100333.cfilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c96100333.cfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:GetHandler():RegisterFlagEffect(96100333,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c96100333.desfilter(c) function c96100333.desfilter(c)
return c:IsFaceup() and c:IsDestructable() return c:IsFaceup() and c:IsDestructable()
end end
function c96100333.spfilter(c,e,tp) function c96100333.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) if chkc then return chkc:IsOnField() and c96100333.desfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c96100333.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c96100333.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c96100333.tdfilter(c) function c96100333.desop(e,tp,eg,ep,ev,re,r,rp)
return c:IsType(TYPE_FIELD) and c:IsAbleToDeck() if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c96100333.spcfilter1(c,cg,sg)
local g=sg:Clone()
g:RemoveCard(c)
return cg:IsExists(c96100333.spcfilter2,1,c,g)
end end
function c96100333.tspfilter(c,e,tp) function c96100333.spcfilter2(c,sg)
return sg:IsExists(aux.TRUE,1,c)
end
function c96100333.spfilter(c,e,tp)
return c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c96100333.cfilter,tp,LOCATION_GRAVE,0,2,c)
end end
function c96100333.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c96100333.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96100333.spfilter(chkc,e,tp) end
if e:GetLabel()==1 then return chkc:IsOnField() and c96100333.desfilter(chkc) and chkc~=e:GetHandler() local cg=Duel.GetMatchingGroup(c96100333.cfilter,tp,LOCATION_GRAVE,0,nil)
elseif e:GetLabel()==2 then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96100333.spfilter(chkc,e,tp) local sg=Duel.GetMatchingGroup(c96100333.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
else return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96100333.tdfilter(chkc) end if chk==0 then return e:GetHandler():GetFlagEffect(96100333)==0
end
if chk==0 then return true end
local b1=Duel.IsExistingTarget(c96100333.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
local b2=Duel.IsExistingTarget(c96100333.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b3=Duel.IsExistingTarget(c96100333.tdfilter,tp,LOCATION_GRAVE,0,1,nil) and cg:IsExists(c96100333.spcfilter1,1,nil,cg,sg) end
and Duel.IsPlayerCanDraw(tp,1)
if b2 and not (b1 and b3) then
b2=Duel.IsExistingTarget(c96100333.tspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
if Duel.IsExistingMatchingCard(c96100333.cfilter,tp,LOCATION_GRAVE,0,2,nil)
and (b1 or b2 or b3) and Duel.SelectYesNo(tp,94) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c96100333.cfilter,tp,LOCATION_GRAVE,0,2,2,nil) local g1=cg:FilterSelect(tp,c96100333.spcfilter1,1,1,nil,cg,sg)
Duel.Remove(g,POS_FACEUP,REASON_COST) sg:RemoveCard(g1:GetFirst())
b2=Duel.IsExistingTarget(c96100333.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local g2=cg:FilterSelect(tp,c96100333.spcfilter2,1,1,g1:GetFirst(),sg)
e:SetProperty(EFFECT_FLAG_CARD_TARGET) sg:RemoveCard(g2:GetFirst())
local ops={} g1:Merge(g2)
local opval={} Duel.Remove(g1,POS_FACEUP,REASON_COST)
local off=1
if b1 then
ops[off]=aux.Stringid(96100333,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(96100333,2)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(96100333,3)
opval[off-1]=3
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c96100333.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
e:SetCategory(CATEGORY_DESTROY)
elseif sel==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c96100333.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=sg:Select(tp,1,1,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
e:SetCategory(CATEGORY_SPECIAL_SUMMON) e:GetHandler():RegisterFlagEffect(96100333,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c96100333.tdfilter,tp,LOCATION_GRAVE,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
e:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
end
e:GetHandler():RegisterFlagEffect(96100333,RESET_PHASE+PHASE_END,0,1)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
else
e:SetCategory(0)
e:SetProperty(0)
end
end end
function c96100333.operation(e,tp,eg,ep,ev,re,r,rp) function c96100333.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(96100333)==0 or not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local sel=e:GetLabel()
if sel==1 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
elseif sel==2 then
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end end
else end
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) function c96100333.tdcfilter1(c,cg,sg)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)<1 then return end local g=sg:Clone()
g:RemoveCard(c)
return cg:IsExists(c96100333.spcfilter2,1,c,g)
end
function c96100333.tdcfilter2(c,sg)
return sg:IsExists(aux.TRUE,1,c)
end
function c96100333.tdfilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToDeck()
end
function c96100333.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96100333.tdfilter(chkc) end
local cg=Duel.GetMatchingGroup(c96100333.cfilter,tp,LOCATION_GRAVE,0,nil)
local sg=Duel.GetMatchingGroup(c96100333.tdfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return e:GetHandler():GetFlagEffect(96100333)==0
and Duel.IsPlayerCanDraw(tp,1)
and cg:IsExists(c96100333.tdcfilter1,1,nil,cg,sg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=cg:FilterSelect(tp,c96100333.tdcfilter1,1,1,nil,cg,sg)
sg:RemoveCard(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=cg:FilterSelect(tp,c96100333.tdcfilter2,1,1,g1:GetFirst(),sg)
sg:RemoveCard(g2:GetFirst())
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=sg:Select(tp,1,3,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
e:GetHandler():RegisterFlagEffect(96100333,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c96100333.tdop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()==0 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
...@@ -130,32 +158,19 @@ function c96100333.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -130,32 +158,19 @@ function c96100333.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end
end
function c96100333.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c96100333.cfilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c96100333.cfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c96100333.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c96100333.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then if chkc then
if e:GetLabel()==1 then return chkc:IsOnField() and c96100333.desfilter(chkc) and chkc~=e:GetHandler() if e:GetLabel()==1 then return c96100333.destg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
elseif e:GetLabel()==2 then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96100333.spfilter(chkc,e,tp) elseif e:GetLabel()==2 then return c96100333.sptg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
else return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96100333.tdfilter(chkc) end else return c96100333.tdtg(e,tp,eg,ep,ev,re,r,rp,0,chkc) end
end end
local b1=Duel.IsExistingTarget(c96100333.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) if chk==0 then return true end
local b2=Duel.IsExistingTarget(c96100333.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) local b1=c96100333.cost(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c96100333.destg(e,tp,eg,ep,ev,re,r,rp,0)
local b3=Duel.IsExistingTarget(c96100333.tdfilter,tp,LOCATION_GRAVE,0,1,nil) local b2=c96100333.sptg(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.IsPlayerCanDraw(tp,1) local b3=c96100333.tdtg(e,tp,eg,ep,ev,re,r,rp,0)
if b2 and not (b1 and b3) then if (b1 or b2 or b3) and Duel.SelectYesNo(tp,94) then
b2=Duel.IsExistingTarget(c96100333.tspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
if chk==0 then return e:GetHandler():GetFlagEffect(96100333)==0
and (b1 or b2 or b3) end
b2=Duel.IsExistingTarget(c96100333.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local ops={} local ops={}
local opval={} local opval={}
local off=1 local off=1
...@@ -178,18 +193,23 @@ function c96100333.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -178,18 +193,23 @@ function c96100333.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local sel=opval[op] local sel=opval[op]
e:SetLabel(sel) e:SetLabel(sel)
if sel==1 then if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) c96100333.cost(e,tp,eg,ep,ev,re,r,rp,1)
local g=Duel.SelectTarget(tp,c96100333.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) c96100333.destg(e,tp,eg,ep,ev,re,r,rp,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) e:SetCategory(CATEGORY_DESTROY)
e:SetOperation(c96100333.desop)
elseif sel==2 then elseif sel==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) c96100333.sptg(e,tp,eg,ep,ev,re,r,rp,1)
local g=Duel.SelectTarget(tp,c96100333.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) e:SetOperation(c96100333.spop)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) c96100333.tdtg(e,tp,eg,ep,ev,re,r,rp,1)
local g=Duel.SelectTarget(tp,c96100333.tdfilter,tp,LOCATION_GRAVE,0,1,3,nil) e:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) e:SetOperation(c96100333.tdop)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
else
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end end
e:GetHandler():RegisterFlagEffect(96100333,RESET_PHASE+PHASE_END,0,1)
end end
...@@ -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