Commit 57ab359d authored by VanillaSalt's avatar VanillaSalt

fix

parent 97d5f3ec
...@@ -29,6 +29,7 @@ function c24696097.initial_effect(c) ...@@ -29,6 +29,7 @@ function c24696097.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24696097,2)) e3:SetDescription(aux.Stringid(24696097,2))
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
...@@ -86,7 +87,8 @@ end ...@@ -86,7 +87,8 @@ end
function c24696097.dacon(e,tp,eg,ep,ev,re,r,rp) function c24696097.dacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp return Duel.GetAttacker():GetControler()~=tp
end end
function c24696097.datg(e,tp,eg,ep,ev,re,r,rp,chk) function c24696097.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc==Duel.GetAttacker() end
if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.GetAttacker():IsCanBeEffectTarget(e) if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.GetAttacker():IsCanBeEffectTarget(e)
and not e:GetHandler():IsStatus(STATUS_CHAINING) end and not e:GetHandler():IsStatus(STATUS_CHAINING) end
Duel.SetTargetCard(Duel.GetAttacker()) Duel.SetTargetCard(Duel.GetAttacker())
......
...@@ -42,25 +42,15 @@ function c27770341.addcount(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,25 +42,15 @@ function c27770341.addcount(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c27770341.activate(e,tp,eg,ep,ev,re,r,rp) function c27770341.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetDescription(7)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(0xff)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetTarget(c27770341.drtarget)
e1:SetOperation(c27770341.droperation) e1:SetOperation(c27770341.droperation)
c:RegisterEffect(e1) Duel.RegisterEffect(e1,tp)
end
function c27770341.drtarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(c27770341[tp])
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,c27770341[tp])
end end
function c27770341.droperation(e,tp,eg,ep,ev,re,r,rp) function c27770341.droperation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Hint(HINT_CARD,0,27770341)
Duel.Draw(p,c27770341[tp],REASON_EFFECT) Duel.Draw(tp,c27770341[tp],REASON_EFFECT)
end end
...@@ -96,7 +96,7 @@ function c34487429.drcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,7 +96,7 @@ function c34487429.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c34487429.filter1,tp,LOCATION_SZONE,0,4,nil) return Duel.IsExistingMatchingCard(c34487429.filter1,tp,LOCATION_SZONE,0,4,nil)
end end
function c34487429.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c34487429.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -38,7 +38,7 @@ function c35762283.drcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,7 +38,7 @@ function c35762283.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c35762283.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c35762283.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -16,8 +16,9 @@ function c4179255.initial_effect(c) ...@@ -16,8 +16,9 @@ function c4179255.initial_effect(c)
e1:SetTarget(c4179255.drtg) e1:SetTarget(c4179255.drtg)
e1:SetOperation(c4179255.drop) e1:SetOperation(c4179255.drop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--equip change --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetDescription(aux.Stringid(4179255,1)) e2:SetDescription(aux.Stringid(4179255,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
...@@ -67,7 +68,7 @@ end ...@@ -67,7 +68,7 @@ end
function c4179255.desop(e,tp,eg,ep,ev,re,r,rp) function c4179255.desop(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 tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_ATTACK) and c4179255.check then if tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_ATTACK) and c4179255.check() then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
...@@ -6,9 +6,10 @@ function c41925941.initial_effect(c) ...@@ -6,9 +6,10 @@ function c41925941.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_CAL) e1:SetHintTiming(TIMING_DAMAGE_CAL)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCondition(c41925941.condition) e1:SetCondition(c41925941.condition)
e1:SetCost(c41925941.cost) e1:SetCost(c41925941.cost)
e1:SetTarget(c41925941.target)
e1:SetOperation(c41925941.operation) e1:SetOperation(c41925941.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -22,7 +23,7 @@ function c41925941.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,7 +23,7 @@ function c41925941.condition(e,tp,eg,ep,ev,re,r,rp)
return d and a:IsRace(RACE_FIEND) and a:IsRelateToBattle() and d:IsFaceup() and d:IsRelateToBattle() return d and a:IsRace(RACE_FIEND) and a:IsRelateToBattle() and d:IsFaceup() and d:IsRelateToBattle()
else else
e:SetLabelObject(a) e:SetLabelObject(a)
return a and a:IsFaceup() and a:IsRace(RACE_FIEND) and a:IsRelateToBattle() return d and d:IsFaceup() and d:IsRace(RACE_FIEND) and d:IsRelateToBattle() and a:IsFaceup() and a:IsRelateToBattle()
end end
end end
function c41925941.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c41925941.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -42,6 +43,12 @@ function c41925941.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,6 +43,12 @@ function c41925941.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,cost) Duel.PayLPCost(tp,cost)
e:SetLabel(cost) e:SetLabel(cost)
end end
function c41925941.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=e:GetLabelObject()
if chkc then return chkc==tc end
if chk==0 then return tc:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tc)
end
function c41925941.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c41925941.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject() local bc=e:GetLabelObject()
local val=e:GetLabel() local val=e:GetLabel()
......
...@@ -30,7 +30,7 @@ function c4756629.initial_effect(c) ...@@ -30,7 +30,7 @@ function c4756629.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c4756629.rmfilter(c,tp) function c4756629.rmfilter(c,tp)
return c:IsSetCard(0xa) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() return c:IsSetCard(0xa) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(c4756629.filter,tp,LOCATION_GRAVE,0,1,c) and Duel.IsExistingTarget(c4756629.filter,tp,LOCATION_GRAVE,0,1,c)
end end
function c4756629.filter(c) function c4756629.filter(c)
...@@ -41,7 +41,7 @@ function c4756629.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +41,7 @@ function c4756629.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(c4756629.rmfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end and Duel.IsExistingMatchingCard(c4756629.rmfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c4756629.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c4756629.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.RegisterFlagEffect(tp,4756629,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,4756629,RESET_PHASE+PHASE_END,0,1)
end end
function c4756629.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c4756629.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -104,7 +104,7 @@ function c4756629.decop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,7 +104,7 @@ function c4756629.decop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,4756630,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,4756630,RESET_PHASE+PHASE_END,0,1)
end end
function c4756629.econ(e) function c4756629.econ(e)
return Duel.GetFlagEffect(tp,4756631)~=0 return Duel.GetFlagEffect(e:GetHandlerPlayer(),4756631)~=0
end end
function c4756629.rfilter(e,c) function c4756629.rfilter(e,c)
return c:IsSetCard(0xa) return c:IsSetCard(0xa)
......
...@@ -13,8 +13,8 @@ function c56286179.initial_effect(c) ...@@ -13,8 +13,8 @@ function c56286179.initial_effect(c)
e2:SetDescription(aux.Stringid(56286179,0)) e2:SetDescription(aux.Stringid(56286179,0))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_DAMAGE) e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c56286179.drcon) e2:SetCondition(c56286179.drcon)
...@@ -26,13 +26,13 @@ function c56286179.ptg(e,c) ...@@ -26,13 +26,13 @@ function c56286179.ptg(e,c)
return c:IsRace(RACE_WARRIOR) return c:IsRace(RACE_WARRIOR)
end end
function c56286179.drcon(e,tp,eg,ep,ev,re,r,rp) function c56286179.drcon(e,tp,eg,ep,ev,re,r,rp)
if r~=REASON_BATTLE or ep==tp then return false end if ep==tp then return false end
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
return d and d:IsDefencePos() and a:GetControler()==tp and a:IsRace(RACE_WARRIOR) return d and d:IsDefencePos() and a:IsControler(tp) and a:IsRace(RACE_WARRIOR)
end end
function c56286179.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c56286179.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -22,7 +22,7 @@ function c58641905.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,7 +22,7 @@ function c58641905.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,1)
e1:SetLabel(cid) e1:SetLabel(cid)
e1:SetValue(c58641905.refcon) e1:SetValue(c58641905.refcon)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
......
...@@ -10,11 +10,7 @@ function c74117290.initial_effect(c) ...@@ -10,11 +10,7 @@ function c74117290.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c74117290.target(e,tp,eg,ep,ev,re,r,rp,chk) function c74117290.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
local d1=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local d2=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
return d1>0 and d2>0
end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end end
......
...@@ -30,7 +30,7 @@ function c78358521.initial_effect(c) ...@@ -30,7 +30,7 @@ function c78358521.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c78358521.rmfilter(c,tp) function c78358521.rmfilter(c,tp)
return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(c78358521.filter,tp,LOCATION_GRAVE,0,1,c) and Duel.IsExistingTarget(c78358521.filter,tp,LOCATION_GRAVE,0,1,c)
end end
function c78358521.filter(c) function c78358521.filter(c)
...@@ -41,7 +41,7 @@ function c78358521.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +41,7 @@ function c78358521.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(c78358521.rmfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end and Duel.IsExistingMatchingCard(c78358521.rmfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c78358521.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c78358521.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.RegisterFlagEffect(tp,78358521,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,78358521,RESET_PHASE+PHASE_END,0,1)
end end
function c78358521.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c78358521.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -104,7 +104,7 @@ function c78358521.decop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,7 +104,7 @@ function c78358521.decop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,78358522,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,78358522,RESET_PHASE+PHASE_END,0,1)
end end
function c78358521.econ(e) function c78358521.econ(e)
return Duel.GetFlagEffect(tp,78358523)~=0 return Duel.GetFlagEffect(e:GetHandlerPlayer(),78358523)~=0
end end
function c78358521.rfilter(e,c) function c78358521.rfilter(e,c)
return c:IsSetCard(0x53) return c:IsSetCard(0x53)
......
...@@ -25,18 +25,18 @@ function c83108603.initial_effect(c) ...@@ -25,18 +25,18 @@ function c83108603.initial_effect(c)
e3:SetOperation(c83108603.matop) e3:SetOperation(c83108603.matop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c83108603.xyzfilter(c) function c83108603.xyzfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c83108603.matfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,c)
end end
function c83108603.matfilter(c) function c83108603.matfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x107d) and c:IsType(TYPE_MONSTER) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x107d) and c:IsType(TYPE_MONSTER)
end end
function c83108603.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c83108603.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83108603.xyzfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83108603.xyzfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c83108603.xyzfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c83108603.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
and Duel.IsExistingMatchingCard(c83108603.matfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c83108603.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c83108603.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end end
function c83108603.matop(e,tp,eg,ep,ev,re,r,rp) function c83108603.matop(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
......
...@@ -40,14 +40,33 @@ end ...@@ -40,14 +40,33 @@ end
function c8483333.spop(e,tp,eg,ep,ev,re,r,rp) function c8483333.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end if ft<=0 then return end
local g=e:GetHandler():GetMaterial():Filter(c8483333.spfilter,nil,e,tp,e:GetHandler()) local c=e:GetHandler()
local g=c:GetMaterial():Filter(c8483333.spfilter,nil,e,tp,c)
if g:GetCount()>0 then if g:GetCount()>0 then
if g:GetCount()<=ft then if g:GetCount()>ft then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ft,ft,nil) g=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
tc=g:GetNext()
end end
Duel.SpecialSummonComplete()
end end
end end
...@@ -25,7 +25,7 @@ function c97396380.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -25,7 +25,7 @@ function c97396380.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c97396380.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c97396380.filter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,1-tp,500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end end
end end
function c97396380.operation(e,tp,eg,ep,ev,re,r,rp) function c97396380.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -32,6 +32,7 @@ function c97489701.initial_effect(c) ...@@ -32,6 +32,7 @@ function c97489701.initial_effect(c)
e4:SetDescription(aux.Stringid(97489701,0)) e4:SetDescription(aux.Stringid(97489701,0))
e4:SetCategory(CATEGORY_REMOVE) e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_ATTACK_ANNOUNCE) e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c97489701.nacon) e4:SetCondition(c97489701.nacon)
...@@ -136,7 +137,8 @@ end ...@@ -136,7 +137,8 @@ end
function c97489701.nacon(e,tp,eg,ep,ev,re,r,rp) function c97489701.nacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp return Duel.GetAttacker():GetControler()~=tp
end end
function c97489701.natg(e,tp,eg,ep,ev,re,r,rp,chk) function c97489701.natg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc==Duel.GetAttacker() end
if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.GetAttacker():IsCanBeEffectTarget(e) if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.GetAttacker():IsCanBeEffectTarget(e)
and not e:GetHandler():IsStatus(STATUS_CHAINING) end and not e:GetHandler():IsStatus(STATUS_CHAINING) end
Duel.SetTargetCard(Duel.GetAttacker()) Duel.SetTargetCard(Duel.GetAttacker())
......
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