Commit e6d228c7 authored by VanillaSalt's avatar VanillaSalt

fix

parent 5b0719c9
...@@ -30,11 +30,11 @@ function c11501629.initial_effect(c) ...@@ -30,11 +30,11 @@ function c11501629.initial_effect(c)
e3:SetOperation(c11501629.damop) e3:SetOperation(c11501629.damop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c11501629.ctfilter(c) function c11501629.ctfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsReason(REASON_EFFECT) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsReason(REASON_EFFECT)
end end
function c11501629.ctcon(e,tp,eg,ep,ev,re,r,rp) function c11501629.ctcon(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c11501629.ctfilter,nil) local ct=eg:FilterCount(c11501629.ctfilter,nil,tp)
e:SetLabel(ct) e:SetLabel(ct)
return ct>0 return ct>0
end end
......
...@@ -78,7 +78,7 @@ function c21105106.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -78,7 +78,7 @@ function c21105106.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetCode(EFFECT_CANNOT_SUMMON) e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=e1:Clone() local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) e3:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
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)
......
...@@ -2,15 +2,26 @@ ...@@ -2,15 +2,26 @@
function c22610082.initial_effect(c) function c22610082.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c22610082.cost)
e1:SetTarget(c22610082.target) e1:SetTarget(c22610082.target)
e1:SetOperation(c22610082.activate) e1:SetOperation(c22610082.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c22610082.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c22610082.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22610082.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then
if chk==0 then return c:IsAbleToDeck() and not c:IsLocation(LOCATION_GRAVE) end if e:GetLabel()==0 then return false end
e:SetLabel(0)
return e:GetHandler():IsAbleToDeck()
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end end
function c22610082.activate(e,tp,eg,ep,ev,re,r,rp) function c22610082.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -12,6 +12,7 @@ function c2295831.initial_effect(c) ...@@ -12,6 +12,7 @@ function c2295831.initial_effect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c2295831.condition) e2:SetCondition(c2295831.condition)
e2:SetCost(c2295831.cost)
e2:SetTarget(c2295831.target) e2:SetTarget(c2295831.target)
e2:SetOperation(c2295831.activate) e2:SetOperation(c2295831.activate)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -33,7 +34,10 @@ function c2295831.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +34,10 @@ function c2295831.regop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c2295831.condition(e,tp,eg,ep,ev,re,r,rp) function c2295831.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and e:GetHandler():GetFlagEffect(2295831)~=0 return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c2295831.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetFlagEffect(2295831)~=0
end end
function c2295831.target(e,tp,eg,ep,ev,re,r,rp,chk) function c2295831.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -77,9 +77,9 @@ function c24096228.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,9 +77,9 @@ function c24096228.operation(e,tp,eg,ep,ev,re,r,rp)
if bit.band(tpe,TYPE_FIELD)~=0 then if bit.band(tpe,TYPE_FIELD)~=0 then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end end
if co then co(e,tp,eg,ep,ev,re,r,rp,1) end if co then co(te,tp,eg,ep,ev,re,r,rp,1) end
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end if tg then tg(te,tp,eg,ep,ev,re,r,rp,1) end
Duel.BreakEffect() Duel.BreakEffect()
if op then op(e,tp,eg,ep,ev,re,r,rp) end if op then op(te,tp,eg,ep,ev,re,r,rp) end
end end
end end
...@@ -5,17 +5,26 @@ function c27068117.initial_effect(c) ...@@ -5,17 +5,26 @@ function c27068117.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c27068117.cost)
e1:SetTarget(c27068117.target) e1:SetTarget(c27068117.target)
e1:SetOperation(c27068117.activate) e1:SetOperation(c27068117.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c27068117.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c27068117.filter(c) function c27068117.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
function c27068117.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c27068117.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c27068117.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c27068117.filter(chkc) end
if chk==0 then return not e:GetHandler():IsLocation(LOCATION_GRAVE) if chk==0 then
and Duel.IsExistingTarget(c27068117.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingTarget(c27068117.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c27068117.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c27068117.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
......
...@@ -46,8 +46,8 @@ end ...@@ -46,8 +46,8 @@ end
function c39122311.operation(e,tp,eg,ep,ev,re,r,rp) function c39122311.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then return end and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then
c:SetCardTarget(tc) c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -12,6 +12,7 @@ function c57734012.initial_effect(c) ...@@ -12,6 +12,7 @@ function c57734012.initial_effect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c57734012.condition) e2:SetCondition(c57734012.condition)
e2:SetCost(c57734012.cost)
e2:SetTarget(c57734012.target) e2:SetTarget(c57734012.target)
e2:SetOperation(c57734012.activate) e2:SetOperation(c57734012.activate)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -33,7 +34,10 @@ function c57734012.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +34,10 @@ function c57734012.regop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c57734012.condition(e,tp,eg,ep,ev,re,r,rp) function c57734012.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() and e:GetHandler():GetFlagEffect(57734012)~=0 return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function c57734012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetFlagEffect(57734012)~=0
end end
function c57734012.filter1(c,e,tp) function c57734012.filter1(c,e,tp)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
......
...@@ -13,10 +13,11 @@ function c69176131.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -13,10 +13,11 @@ function c69176131.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c69176131.activate(e,tp,eg,ep,ev,re,r,rp) function c69176131.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(Card.CheckRemoveOverlayCard,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,1,REASON_EFFECT) local sg=Duel.GetMatchingGroup(Card.CheckRemoveOverlayCard,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,1,REASON_EFFECT)
local rg=nil if sg:GetCount()==0 then return end
if sg:GetCount()==1 then rg=sg else if sg:GetCount()>1 then
rg=sg:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(69176131,0))
Duel.HintSelection(rg) sg=sg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
end end
rg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_EFFECT) sg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
end end
...@@ -2,22 +2,30 @@ ...@@ -2,22 +2,30 @@
function c69764158.initial_effect(c) function c69764158.initial_effect(c)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69764158,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DAMAGE) e1:SetCode(EVENT_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CVAL_CHECK)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c69764158.descon) e1:SetCondition(c69764158.descon)
e1:SetCost(c69764158.descost) e1:SetCost(c69764158.descost)
e1:SetTarget(c69764158.destg) e1:SetTarget(c69764158.destg)
e1:SetOperation(c69764158.desop) e1:SetOperation(c69764158.desop)
e1:SetValue(c69764158.valcheck)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c69764158.descon(e,tp,eg,ep,ev,re,r,rp) function c69764158.descon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and (bit.band(r,REASON_BATTLE)~=0 or (bit.band(r,REASON_EFFECT)~=0 and rp~=tp)) return ep==tp and (bit.band(r,REASON_BATTLE)~=0 or (bit.band(r,REASON_EFFECT)~=0 and rp~=tp))
end end
function c69764158.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c69764158.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then
if Duel.GetFlagEffect(tp,69764158)==0 then
Duel.RegisterFlagEffect(tp,69764158,RESET_CHAIN,0,1)
c69764158[0]=e:GetHandler():IsAbleToRemoveAsCost()
end
return c69764158[0]
end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c69764158.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c69764158.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -33,3 +41,6 @@ function c69764158.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,3 +41,6 @@ function c69764158.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
function c69764158.valcheck(e)
c69764158[0]=false
end
...@@ -25,7 +25,7 @@ function c85028288.initial_effect(c) ...@@ -25,7 +25,7 @@ function c85028288.initial_effect(c)
e3:SetOperation(c85028288.atkop) e3:SetOperation(c85028288.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c85028288.efilter(e,re) function c85028288.efilter(e,re,rp)
return re:GetHandler():IsType(TYPE_TRAP+TYPE_MONSTER) and aux.tgval(e,re,rp) return re:GetHandler():IsType(TYPE_TRAP+TYPE_MONSTER) and aux.tgval(e,re,rp)
end end
function c85028288.cfilter(c) function c85028288.cfilter(c)
......
...@@ -79,7 +79,7 @@ function c93238626.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function c93238626.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateAttack() then return end if not Duel.NegateAttack() then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
local tc=Duel.GetAttackTarget() local tc=Duel.GetAttackTarget()
local m=_G["c"..Duel.GetAttackTarget():GetCode()] local m=_G["c"..tc:GetCode()]
if tc:IsFacedown() or not tc:IsRelateToBattle() or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or not m then return end if tc:IsFacedown() or not tc:IsRelateToBattle() or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or not m then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c93238626.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,m.xyz_number) local g=Duel.SelectMatchingCard(tp,c93238626.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,m.xyz_number)
......
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