Commit e5a3945a authored by VanillaSalt's avatar VanillaSalt
parent 176dfba0
...@@ -9,6 +9,7 @@ function c13317419.initial_effect(c) ...@@ -9,6 +9,7 @@ function c13317419.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,13317419) e1:SetCountLimit(1,13317419)
e1:SetCondition(c13317419.condition) e1:SetCondition(c13317419.condition)
e1:SetCost(c13317419.cost)
e1:SetTarget(c13317419.target) e1:SetTarget(c13317419.target)
e1:SetOperation(c13317419.operation) e1:SetOperation(c13317419.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -29,12 +30,36 @@ end ...@@ -29,12 +30,36 @@ end
function c13317419.condition(e,tp,eg,ep,ev,re,r,rp) function c13317419.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 c13317419.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c13317419.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c13317419.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c13317419.filter(c) function c13317419.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttackAbove(800) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttackAbove(800)
end end
function c13317419.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13317419.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c13317419.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c13317419.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c13317419.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c13317419.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c13317419.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c13317419.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
...@@ -42,10 +67,10 @@ end ...@@ -42,10 +67,10 @@ end
function c13317419.operation(e,tp,eg,ep,ev,re,r,rp) function c13317419.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup --Atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -61,6 +86,8 @@ function c13317419.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,6 +86,8 @@ function c13317419.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(1) e2:SetValue(1)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else
c:CancelToGrave(false)
end end
end end
function c13317419.descon(e,tp,eg,ep,ev,re,r,rp) function c13317419.descon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -6,16 +6,41 @@ function c15684835.initial_effect(c) ...@@ -6,16 +6,41 @@ function c15684835.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c15684835.cost)
e1:SetTarget(c15684835.target) e1:SetTarget(c15684835.target)
e1:SetOperation(c15684835.operation) e1:SetOperation(c15684835.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c15684835.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c15684835.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c15684835.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c15684835.filter(c,e,tp) function c15684835.filter(c,e,tp)
return c:IsFaceup() and c:IsControler(1-tp) and c:IsCanBeEffectTarget(e) return c:IsFaceup() and c:IsControler(1-tp) and c:IsCanBeEffectTarget(e)
end end
function c15684835.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15684835.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c15684835.filter(chkc,e,tp) end if chkc then return eg:IsContains(chkc) and c15684835.filter(chkc,e,tp) end
if chk==0 then return eg:IsExists(c15684835.filter,1,nil,e,tp) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and eg:IsExists(c15684835.filter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=eg:FilterSelect(tp,c15684835.filter,1,1,nil,e,tp) local g=eg:FilterSelect(tp,c15684835.filter,1,1,nil,e,tp)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
...@@ -24,13 +49,14 @@ end ...@@ -24,13 +49,14 @@ end
function c15684835.operation(e,tp,eg,ep,ev,re,r,rp) function c15684835.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--damage --damage
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15684835,0)) e1:SetDescription(aux.Stringid(15684835,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
...@@ -57,6 +83,8 @@ function c15684835.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,6 +83,8 @@ function c15684835.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetLabelObject(tc) e3:SetLabelObject(tc)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end end
end end
function c15684835.eqlimit(e,c) function c15684835.eqlimit(e,c)
......
...@@ -8,9 +8,11 @@ function c18096222.initial_effect(c) ...@@ -8,9 +8,11 @@ function c18096222.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c18096222.condition) e1:SetCondition(c18096222.condition)
e1:SetCost(c18096222.cost)
e1:SetTarget(c18096222.target) e1:SetTarget(c18096222.target)
e1:SetOperation(c18096222.operation) e1:SetOperation(c18096222.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(18096222,0)) e2:SetDescription(aux.Stringid(18096222,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
...@@ -24,12 +26,36 @@ end ...@@ -24,12 +26,36 @@ end
function c18096222.condition(e,tp,eg,ep,ev,re,r,rp) function c18096222.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 c18096222.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c18096222.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c18096222.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c18096222.filter(c) function c18096222.filter(c)
return c:IsFaceup() and c:IsType(TYPE_DUAL) return c:IsFaceup() and c:IsType(TYPE_DUAL)
end end
function c18096222.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c18096222.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c18096222.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c18096222.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c18096222.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c18096222.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c18096222.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c18096222.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
...@@ -37,10 +63,10 @@ end ...@@ -37,10 +63,10 @@ end
function c18096222.operation(e,tp,eg,ep,ev,re,r,rp) function c18096222.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup --Atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -56,6 +82,8 @@ function c18096222.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,6 +82,8 @@ function c18096222.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(c18096222.eqlimit) e2:SetValue(c18096222.eqlimit)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else
c:CancelToGrave(false)
end end
end end
function c18096222.eqlimit(e,c) function c18096222.eqlimit(e,c)
......
...@@ -6,27 +6,52 @@ function c18446701.initial_effect(c) ...@@ -6,27 +6,52 @@ function c18446701.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c18446701.cost)
e1:SetTarget(c18446701.target) e1:SetTarget(c18446701.target)
e1:SetOperation(c18446701.operation) e1:SetOperation(c18446701.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c18446701.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c18446701.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c18446701.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c18446701.filter(c) function c18446701.filter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end end
function c18446701.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c18446701.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c18446701.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c18446701.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c18446701.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c18446701.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c18446701.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c18446701.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c18446701.operation(e,tp,eg,ep,ev,re,r,rp) function c18446701.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetControler()==c:GetControler() then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetControler()==c:GetControler() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -43,6 +68,8 @@ function c18446701.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,6 +68,8 @@ function c18446701.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(c18446701.eqlimit) e2:SetValue(c18446701.eqlimit)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else
c:CancelToGrave(false)
end end
end end
function c18446701.eqlimit(e,c) function c18446701.eqlimit(e,c)
......
...@@ -6,6 +6,7 @@ function c20007374.initial_effect(c) ...@@ -6,6 +6,7 @@ function c20007374.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c20007374.condition) e1:SetCondition(c20007374.condition)
e1:SetCost(c20007374.cost)
e1:SetTarget(c20007374.target) e1:SetTarget(c20007374.target)
e1:SetOperation(c20007374.activate) e1:SetOperation(c20007374.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -34,6 +35,29 @@ function c20007374.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,6 +35,29 @@ function c20007374.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c20007374.cfilter,tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c20007374.cfilter,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=5 return g:GetClassCount(Card.GetCode)>=5
end end
function c20007374.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c20007374.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c20007374.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c20007374.filter(c,e,tp) function c20007374.filter(c,e,tp)
return c:IsCode(44508094) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return c:IsCode(44508094) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end end
...@@ -49,9 +73,8 @@ function c20007374.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,9 +73,8 @@ function c20007374.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c20007374.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c20007374.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) then if tc and Duel.SpecialSummonStep(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) then
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED) then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Add Equip limit --Add Equip limit
local e1=Effect.CreateEffect(tc) local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -75,6 +98,8 @@ function c20007374.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,6 +98,8 @@ function c20007374.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
tc:CompleteProcedure() tc:CompleteProcedure()
else
c:CancelToGrave(false)
end end
end end
function c20007374.eqlimit(e,c) function c20007374.eqlimit(e,c)
......
...@@ -8,6 +8,7 @@ function c21350571.initial_effect(c) ...@@ -8,6 +8,7 @@ function c21350571.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c21350571.condition) e1:SetCondition(c21350571.condition)
e1:SetCost(c21350571.cost)
e1:SetTarget(c21350571.target) e1:SetTarget(c21350571.target)
e1:SetOperation(c21350571.operation) e1:SetOperation(c21350571.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,23 +16,47 @@ end ...@@ -15,23 +16,47 @@ end
function c21350571.condition(e,tp,eg,ep,ev,re,r,rp) function c21350571.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 c21350571.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c21350571.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c21350571.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c21350571.filter(c) function c21350571.filter(c)
return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR) return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR)
end end
function c21350571.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c21350571.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c21350571.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c21350571.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c21350571.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c21350571.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c21350571.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c21350571.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c21350571.operation(e,tp,eg,ep,ev,re,r,rp) function c21350571.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
...@@ -60,6 +85,8 @@ function c21350571.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,6 +85,8 @@ function c21350571.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(c21350571.eqlimit) e3:SetValue(c21350571.eqlimit)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end end
end end
function c21350571.eqlimit(e,c) function c21350571.eqlimit(e,c)
......
...@@ -6,27 +6,52 @@ function c23122036.initial_effect(c) ...@@ -6,27 +6,52 @@ function c23122036.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c23122036.cost)
e1:SetTarget(c23122036.target) e1:SetTarget(c23122036.target)
e1:SetOperation(c23122036.operation) e1:SetOperation(c23122036.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c23122036.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c23122036.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c23122036.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c23122036.filter(c) function c23122036.filter(c)
return c:IsFaceup() return c:IsFaceup()
end end
function c23122036.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23122036.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c23122036.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c23122036.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c23122036.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c23122036.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c23122036.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c23122036.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c23122036.operation(e,tp,eg,ep,ev,re,r,rp) function c23122036.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetControler()==c:GetControler() then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetControler()==c:GetControler() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--indes --indes
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -51,6 +76,8 @@ function c23122036.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,6 +76,8 @@ function c23122036.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(1) e3:SetValue(1)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end end
end end
function c23122036.valcon(e,re,r,rp) function c23122036.valcon(e,re,r,rp)
......
...@@ -6,6 +6,7 @@ function c2542230.initial_effect(c) ...@@ -6,6 +6,7 @@ function c2542230.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c2542230.cost)
e1:SetTarget(c2542230.target) e1:SetTarget(c2542230.target)
e1:SetOperation(c2542230.activate) e1:SetOperation(c2542230.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -17,12 +18,36 @@ function c2542230.initial_effect(c) ...@@ -17,12 +18,36 @@ function c2542230.initial_effect(c)
e2:SetOperation(c2542230.regop) e2:SetOperation(c2542230.regop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c2542230.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c2542230.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c2542230.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c2542230.filter(c) function c2542230.filter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO)
end end
function c2542230.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c2542230.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c2542230.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c2542230.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c2542230.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c2542230.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c2542230.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c2542230.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
...@@ -30,10 +55,10 @@ end ...@@ -30,10 +55,10 @@ end
function c2542230.activate(e,tp,eg,ep,ev,re,r,rp) function c2542230.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
...@@ -49,6 +74,8 @@ function c2542230.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,6 +74,8 @@ function c2542230.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetCondition(c2542230.discon) e2:SetCondition(c2542230.discon)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else
c:CancelToGrave(false)
end end
end end
function c2542230.eqlimit(e,c) function c2542230.eqlimit(e,c)
......
...@@ -8,6 +8,7 @@ function c259314.initial_effect(c) ...@@ -8,6 +8,7 @@ function c259314.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c259314.condition) e1:SetCondition(c259314.condition)
e1:SetCost(c259314.cost)
e1:SetTarget(c259314.target) e1:SetTarget(c259314.target)
e1:SetOperation(c259314.operation) e1:SetOperation(c259314.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,23 +16,47 @@ end ...@@ -15,23 +16,47 @@ end
function c259314.condition(e,tp,eg,ep,ev,re,r,rp) function c259314.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 c259314.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c259314.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c259314.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c259314.filter(c) function c259314.filter(c)
return c:IsFaceup() and c:IsSetCard(0x56) return c:IsFaceup() and c:IsSetCard(0x56)
end end
function c259314.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c259314.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c259314.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c259314.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c259314.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c259314.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c259314.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c259314.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c259314.operation(e,tp,eg,ep,ev,re,r,rp) function c259314.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atk/def --Atk/def
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -53,6 +78,8 @@ function c259314.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,6 +78,8 @@ function c259314.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetValue(aux.indoval) e3:SetValue(aux.indoval)
c:RegisterEffect(e3,true) c:RegisterEffect(e3,true)
else
c:CancelToGrave(false)
end end
end end
function c259314.eqlimit(e,c) function c259314.eqlimit(e,c)
......
...@@ -7,27 +7,52 @@ function c26647858.initial_effect(c) ...@@ -7,27 +7,52 @@ function c26647858.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START) e1:SetHintTiming(0,TIMING_BATTLE_START)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c26647858.cost)
e1:SetTarget(c26647858.target) e1:SetTarget(c26647858.target)
e1:SetOperation(c26647858.operation) e1:SetOperation(c26647858.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c26647858.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c26647858.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c26647858.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c26647858.filter(c) function c26647858.filter(c)
return c:IsFaceup() and c:IsAttackBelow(1500) and c:IsRace(RACE_WARRIOR) return c:IsFaceup() and c:IsAttackBelow(1500) and c:IsRace(RACE_WARRIOR)
end end
function c26647858.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c26647858.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c26647858.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c26647858.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c26647858.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c26647858.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c26647858.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c26647858.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c26647858.operation(e,tp,eg,ep,ev,re,r,rp) function c26647858.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup --Atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -43,6 +68,8 @@ function c26647858.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,6 +68,8 @@ function c26647858.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(c26647858.eqlimit) e2:SetValue(c26647858.eqlimit)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else
c:CancelToGrave(false)
end end
end end
function c26647858.eqlimit(e,c) function c26647858.eqlimit(e,c)
......
...@@ -6,24 +6,49 @@ function c30155789.initial_effect(c) ...@@ -6,24 +6,49 @@ function c30155789.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c30155789.cost)
e1:SetTarget(c30155789.target) e1:SetTarget(c30155789.target)
e1:SetOperation(c30155789.operation) e1:SetOperation(c30155789.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c30155789.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c30155789.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c30155789.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c30155789.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c30155789.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c30155789.operation(e,tp,eg,ep,ev,re,r,rp) function c30155789.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -49,6 +74,8 @@ function c30155789.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,6 +74,8 @@ function c30155789.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetLabelObject(tc) e3:SetLabelObject(tc)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end end
end end
function c30155789.eqlimit(e,c) function c30155789.eqlimit(e,c)
......
...@@ -8,6 +8,7 @@ function c37390589.initial_effect(c) ...@@ -8,6 +8,7 @@ function c37390589.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c37390589.condition) e1:SetCondition(c37390589.condition)
e1:SetCost(c37390589.cost)
e1:SetTarget(c37390589.target) e1:SetTarget(c37390589.target)
e1:SetOperation(c37390589.operation) e1:SetOperation(c37390589.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,6 +16,10 @@ end ...@@ -15,6 +16,10 @@ end
function c37390589.condition(e,tp,eg,ep,ev,re,r,rp) function c37390589.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 c37390589.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetLabel(9)
end
function c37390589.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c37390589.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then if chkc then
if e:GetLabel()==0 then if e:GetLabel()==0 then
...@@ -26,7 +31,8 @@ function c37390589.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -26,7 +31,8 @@ function c37390589.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetTurnPlayer()~=tp local b1=Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetTurnPlayer()~=tp
and Duel.GetAttacker():IsLocation(LOCATION_MZONE) and Duel.GetAttacker():IsAttackPos() and Duel.GetAttacker():IsLocation(LOCATION_MZONE) and Duel.GetAttacker():IsAttackPos()
and Duel.GetAttacker():IsCanChangePosition() and Duel.GetAttacker():IsCanBeEffectTarget(e) and Duel.GetAttacker():IsCanChangePosition() and Duel.GetAttacker():IsCanBeEffectTarget(e)
local b2=Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) local b2=e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local opt=0 local opt=0
if b1 and b2 then if b1 and b2 then
...@@ -36,16 +42,37 @@ function c37390589.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -36,16 +42,37 @@ function c37390589.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
else else
opt=Duel.SelectOption(tp,aux.Stringid(37390589,1))+1 opt=Duel.SelectOption(tp,aux.Stringid(37390589,1))+1
end end
e:SetLabel(opt)
if opt==0 or opt==2 then if opt==0 or opt==2 then
Duel.SetTargetCard(Duel.GetAttacker()) Duel.SetTargetCard(Duel.GetAttacker())
end end
if opt==1 or opt==2 then if opt==1 or opt==2 then
if e:GetCount()==9 then
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c37390589.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
e:SetLabel(opt)
end
function c37390589.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end end
function c37390589.operation(e,tp,eg,ep,ev,re,r,rp) function c37390589.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -57,10 +84,11 @@ function c37390589.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,10 +84,11 @@ function c37390589.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
if opt==1 or opt==2 then if opt==1 or opt==2 then
local tc=e:GetLabelObject() if not c:IsLocation(LOCATION_SZONE) then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup --Atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -76,6 +104,8 @@ function c37390589.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,6 +104,8 @@ function c37390589.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(c37390589.eqlimit) e2:SetValue(c37390589.eqlimit)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else
c:CancelToGrave(false)
end end
end end
end end
......
...@@ -8,6 +8,7 @@ function c38643567.initial_effect(c) ...@@ -8,6 +8,7 @@ function c38643567.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c38643567.condition) e1:SetCondition(c38643567.condition)
e1:SetCost(c38643567.cost)
e1:SetTarget(c38643567.target) e1:SetTarget(c38643567.target)
e1:SetOperation(c38643567.operation) e1:SetOperation(c38643567.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,23 +16,47 @@ end ...@@ -15,23 +16,47 @@ end
function c38643567.condition(e,tp,eg,ep,ev,re,r,rp) function c38643567.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 c38643567.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c38643567.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c38643567.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c38643567.filter(c) function c38643567.filter(c)
return c:IsFaceup() and c:IsSetCard(0x56) return c:IsFaceup() and c:IsSetCard(0x56)
end end
function c38643567.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c38643567.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c38643567.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c38643567.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c38643567.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c38643567.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c38643567.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c38643567.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c38643567.operation(e,tp,eg,ep,ev,re,r,rp) function c38643567.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atk/def --Atk/def
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -66,13 +91,14 @@ function c38643567.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,13 +91,14 @@ function c38643567.operation(e,tp,eg,ep,ev,re,r,rp)
e4:SetOperation(c38643567.ngop) e4:SetOperation(c38643567.ngop)
e4:SetReset(RESET_EVENT+0x1fe0000) e4:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e4) c:RegisterEffect(e4)
else
c:CancelToGrave(false)
end end
end end
function c38643567.eqlimit(e,c) function c38643567.eqlimit(e,c)
return c:IsSetCard(0x56) return c:IsSetCard(0x56)
end end
function c38643567.ngcon(e,tp,eg,ep,ev,re,r,rp) function c38643567.ngcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local loc,tg=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TARGET_CARDS) local loc,tg=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TARGET_CARDS)
local tc=tg:GetFirst() local tc=tg:GetFirst()
...@@ -87,6 +113,6 @@ function c38643567.ngtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -87,6 +113,6 @@ function c38643567.ngtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end end
function c38643567.ngop(e,tp,eg,ep,ev,re,r,rp,chk) function c38643567.ngop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
...@@ -8,6 +8,7 @@ function c43405287.initial_effect(c) ...@@ -8,6 +8,7 @@ function c43405287.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c43405287.condition) e1:SetCondition(c43405287.condition)
e1:SetCost(c43405287.cost)
e1:SetTarget(c43405287.target) e1:SetTarget(c43405287.target)
e1:SetOperation(c43405287.operation) e1:SetOperation(c43405287.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,23 +16,47 @@ end ...@@ -15,23 +16,47 @@ end
function c43405287.condition(e,tp,eg,ep,ev,re,r,rp) function c43405287.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 c43405287.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c43405287.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c43405287.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c43405287.filter(c) function c43405287.filter(c)
return c:IsFaceup() and c:IsSetCard(0xc008) return c:IsFaceup() and c:IsSetCard(0xc008)
end end
function c43405287.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c43405287.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c43405287.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c43405287.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c43405287.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c43405287.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c43405287.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c43405287.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c43405287.operation(e,tp,eg,ep,ev,re,r,rp) function c43405287.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43405287,0)) e1:SetDescription(aux.Stringid(43405287,0))
...@@ -60,6 +85,8 @@ function c43405287.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,6 +85,8 @@ function c43405287.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(c43405287.eqlimit) e3:SetValue(c43405287.eqlimit)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end end
end end
function c43405287.eqlimit(e,c) function c43405287.eqlimit(e,c)
......
...@@ -7,6 +7,7 @@ function c47819246.initial_effect(c) ...@@ -7,6 +7,7 @@ function c47819246.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c47819246.condition) e1:SetCondition(c47819246.condition)
e1:SetCost(c47819246.cost)
e1:SetTarget(c47819246.target) e1:SetTarget(c47819246.target)
e1:SetOperation(c47819246.operation) e1:SetOperation(c47819246.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -36,12 +37,36 @@ end ...@@ -36,12 +37,36 @@ end
function c47819246.condition(e,tp,eg,ep,ev,re,r,rp) function c47819246.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 c47819246.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c47819246.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c47819246.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c47819246.filter(c) function c47819246.filter(c)
return c:IsFaceup() and c:IsSetCard(0xdc) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0xdc) and c:IsType(TYPE_XYZ)
end end
function c47819246.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c47819246.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c47819246.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c47819246.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c47819246.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c47819246.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c47819246.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c47819246.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
...@@ -49,10 +74,10 @@ end ...@@ -49,10 +74,10 @@ end
function c47819246.operation(e,tp,eg,ep,ev,re,r,rp) function c47819246.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetControler()==c:GetControler() then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetControler()==c:GetControler() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Equip limit --Equip limit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -61,6 +86,8 @@ function c47819246.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,6 +86,8 @@ function c47819246.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c47819246.eqlimit) e1:SetValue(c47819246.eqlimit)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
else
c:CancelToGrave(false)
end end
end end
function c47819246.eqlimit(e,c) function c47819246.eqlimit(e,c)
......
...@@ -7,27 +7,52 @@ function c49551909.initial_effect(c) ...@@ -7,27 +7,52 @@ function c49551909.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_BATTLE_PHASE) e1:SetHintTiming(TIMING_BATTLE_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c49551909.cost)
e1:SetTarget(c49551909.target) e1:SetTarget(c49551909.target)
e1:SetOperation(c49551909.operation) e1:SetOperation(c49551909.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c49551909.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c49551909.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c49551909.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c49551909.filter(c) function c49551909.filter(c)
return c:IsFaceup() and c:IsSetCard(0x6f) return c:IsFaceup() and c:IsSetCard(0x6f)
end end
function c49551909.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c49551909.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c49551909.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c49551909.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49551909.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c49551909.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c49551909.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c49551909.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c49551909.operation(e,tp,eg,ep,ev,re,r,rp) function c49551909.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
...@@ -57,6 +82,8 @@ function c49551909.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,6 +82,8 @@ function c49551909.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(c49551909.eqlimit) e3:SetValue(c49551909.eqlimit)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end end
end end
function c49551909.eqlimit(e,c) function c49551909.eqlimit(e,c)
......
...@@ -6,10 +6,34 @@ function c53656677.initial_effect(c) ...@@ -6,10 +6,34 @@ function c53656677.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetCost(c53656677.cost)
e1:SetTarget(c53656677.target) e1:SetTarget(c53656677.target)
e1:SetOperation(c53656677.operation) e1:SetOperation(c53656677.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c53656677.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c53656677.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c53656677.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c53656677.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c53656677.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc==Duel.GetAttackTarget() end if chkc then return chkc==Duel.GetAttackTarget() end
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
...@@ -21,10 +45,11 @@ end ...@@ -21,10 +45,11 @@ end
function c53656677.operation(e,tp,eg,ep,ev,re,r,rp) function c53656677.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack() Duel.NegateAttack()
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
local atk=a:GetAttack()-d:GetAttack() local atk=a:GetAttack()-d:GetAttack()
...@@ -45,6 +70,8 @@ function c53656677.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,6 +70,8 @@ function c53656677.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetLabelObject(tc) e2:SetLabelObject(tc)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else
c:CancelToGrave(false)
end end
end end
function c53656677.eqlimit(e,c) function c53656677.eqlimit(e,c)
......
...@@ -8,6 +8,7 @@ function c54451023.initial_effect(c) ...@@ -8,6 +8,7 @@ function c54451023.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c54451023.condition) e1:SetCondition(c54451023.condition)
e1:SetCost(c54451023.cost)
e1:SetTarget(c54451023.target) e1:SetTarget(c54451023.target)
e1:SetOperation(c54451023.operation) e1:SetOperation(c54451023.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -26,23 +27,47 @@ end ...@@ -26,23 +27,47 @@ end
function c54451023.condition(e,tp,eg,ep,ev,re,r,rp) function c54451023.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 c54451023.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c54451023.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c54451023.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c54451023.filter(c) function c54451023.filter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT) return c:IsFaceup() and c:IsRace(RACE_PLANT)
end end
function c54451023.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c54451023.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c54451023.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c54451023.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c54451023.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c54451023.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c54451023.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c54451023.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c54451023.operation(e,tp,eg,ep,ev,re,r,rp) function c54451023.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup --Atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -58,6 +83,8 @@ function c54451023.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,6 +83,8 @@ function c54451023.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(c54451023.eqlimit) e2:SetValue(c54451023.eqlimit)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else
c:CancelToGrave(false)
end end
end end
function c54451023.eqlimit(e,c) function c54451023.eqlimit(e,c)
......
...@@ -6,6 +6,7 @@ function c57135971.initial_effect(c) ...@@ -6,6 +6,7 @@ function c57135971.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c57135971.cost)
e1:SetTarget(c57135971.target) e1:SetTarget(c57135971.target)
e1:SetOperation(c57135971.operation) e1:SetOperation(c57135971.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -23,22 +24,47 @@ function c57135971.initial_effect(c) ...@@ -23,22 +24,47 @@ function c57135971.initial_effect(c)
e2:SetOperation(c57135971.desop) e2:SetOperation(c57135971.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c57135971.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c57135971.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c57135971.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c57135971.filter(c) function c57135971.filter(c)
return c:IsSetCard(0x3b) and c:IsFaceup() return c:IsSetCard(0x3b) and c:IsFaceup()
end end
function c57135971.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c57135971.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c57135971.filter(chkc) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end if chkc then return c57135971.filter(chkc) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c57135971.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c57135971.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c57135971.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c57135971.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c57135971.operation(e,tp,eg,ep,ev,re,r,rp) function c57135971.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
...@@ -53,6 +79,8 @@ function c57135971.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,6 +79,8 @@ function c57135971.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(c57135971.eqlimit) e3:SetValue(c57135971.eqlimit)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end end
end end
function c57135971.eqlimit(e,c) function c57135971.eqlimit(e,c)
......
...@@ -8,6 +8,7 @@ function c57470761.initial_effect(c) ...@@ -8,6 +8,7 @@ function c57470761.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c57470761.condition) e1:SetCondition(c57470761.condition)
e1:SetCost(c57470761.cost)
e1:SetTarget(c57470761.target) e1:SetTarget(c57470761.target)
e1:SetOperation(c57470761.activate) e1:SetOperation(c57470761.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,12 +16,36 @@ end ...@@ -15,12 +16,36 @@ end
function c57470761.condition(e,tp,eg,ep,ev,re,r,rp) function c57470761.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 c57470761.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c57470761.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c57470761.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c57470761.filter(c) function c57470761.filter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) return c:IsFaceup() and c:IsRace(RACE_DRAGON)
end end
function c57470761.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c57470761.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c57470761.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c57470761.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c57470761.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c57470761.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c57470761.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c57470761.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
...@@ -28,10 +53,10 @@ end ...@@ -28,10 +53,10 @@ end
function c57470761.activate(e,tp,eg,ep,ev,re,r,rp) function c57470761.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
...@@ -79,6 +104,8 @@ function c57470761.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,6 +104,8 @@ function c57470761.activate(e,tp,eg,ep,ev,re,r,rp)
e9:SetOperation(c57470761.desop) e9:SetOperation(c57470761.desop)
e9:SetReset(RESET_EVENT+0x1fe0000) e9:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e9) c:RegisterEffect(e9)
else
c:CancelToGrave(false)
end end
end end
function c57470761.eqlimit(e,c) function c57470761.eqlimit(e,c)
......
...@@ -8,6 +8,7 @@ function c58272005.initial_effect(c) ...@@ -8,6 +8,7 @@ function c58272005.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c58272005.condition) e1:SetCondition(c58272005.condition)
e1:SetCost(c58272005.cost)
e1:SetTarget(c58272005.target) e1:SetTarget(c58272005.target)
e1:SetOperation(c58272005.operation) e1:SetOperation(c58272005.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,23 +16,47 @@ end ...@@ -15,23 +16,47 @@ end
function c58272005.condition(e,tp,eg,ep,ev,re,r,rp) function c58272005.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 c58272005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c58272005.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c58272005.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c58272005.filter(c) function c58272005.filter(c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR) return c:IsFaceup() and c:IsRace(RACE_DINOSAUR)
end end
function c58272005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c58272005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c58272005.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c58272005.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c58272005.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c58272005.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c58272005.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c58272005.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c58272005.operation(e,tp,eg,ep,ev,re,r,rp) function c58272005.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup --Atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -57,6 +82,8 @@ function c58272005.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,6 +82,8 @@ function c58272005.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetOperation(c58272005.atop) e3:SetOperation(c58272005.atop)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end end
end end
function c58272005.eqlimit(e,c) function c58272005.eqlimit(e,c)
......
...@@ -8,6 +8,7 @@ function c6112401.initial_effect(c) ...@@ -8,6 +8,7 @@ function c6112401.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c6112401.condition) e1:SetCondition(c6112401.condition)
e1:SetCost(c6112401.cost)
e1:SetTarget(c6112401.target) e1:SetTarget(c6112401.target)
e1:SetOperation(c6112401.operation) e1:SetOperation(c6112401.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -19,19 +20,43 @@ function c6112401.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,19 +20,43 @@ function c6112401.condition(e,tp,eg,ep,ev,re,r,rp)
e:SetLabelObject(tc) e:SetLabelObject(tc)
return g:GetCount()==1 and tc:IsFaceup() and tc:IsSetCard(0x100d) return g:GetCount()==1 and tc:IsFaceup() and tc:IsSetCard(0x100d)
end end
function c6112401.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c6112401.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c6112401.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c6112401.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c6112401.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return e:GetLabelObject():IsCanBeEffectTarget(e) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and e:GetLabelObject():IsCanBeEffectTarget(e) end
Duel.SetTargetCard(e:GetLabelObject()) Duel.SetTargetCard(e:GetLabelObject())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c6112401.operation(e,tp,eg,ep,ev,re,r,rp) function c6112401.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
local tc=e:GetLabelObject() if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
...@@ -60,6 +85,8 @@ function c6112401.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,6 +85,8 @@ function c6112401.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(c6112401.eqlimit) e3:SetValue(c6112401.eqlimit)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end end
end end
function c6112401.eqlimit(e,c) function c6112401.eqlimit(e,c)
......
...@@ -7,6 +7,7 @@ function c62868900.initial_effect(c) ...@@ -7,6 +7,7 @@ function c62868900.initial_effect(c)
e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c62868900.condition) e1:SetCondition(c62868900.condition)
e1:SetCost(c62868900.cost)
e1:SetTarget(c62868900.target) e1:SetTarget(c62868900.target)
e1:SetOperation(c62868900.operation) e1:SetOperation(c62868900.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,6 +16,29 @@ function c62868900.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,6 +16,29 @@ function c62868900.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
return tc:IsControler(tp) and tc:IsPosition(POS_FACEUP_ATTACK) and tc:IsCanChangePosition() and tc:IsSetCard(0xc008) return tc:IsControler(tp) and tc:IsPosition(POS_FACEUP_ATTACK) and tc:IsCanChangePosition() and tc:IsSetCard(0xc008)
end end
function c62868900.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c62868900.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c62868900.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c62868900.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c62868900.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc==eg:GetFirst() end if chkc then return chkc==eg:GetFirst() end
if chk==0 then return eg:GetFirst():IsCanBeEffectTarget(e) end if chk==0 then return eg:GetFirst():IsCanBeEffectTarget(e) end
...@@ -25,8 +49,11 @@ function c62868900.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,8 +49,11 @@ function c62868900.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave() c:CancelToGrave()
--Atkup --Atkup
...@@ -45,6 +72,8 @@ function c62868900.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,6 +72,8 @@ function c62868900.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetLabelObject(tc) e2:SetLabelObject(tc)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else
c:CancelToGrave(true)
end end
end end
function c62868900.eqlimit(e,c) function c62868900.eqlimit(e,c)
......
...@@ -8,6 +8,7 @@ function c63049052.initial_effect(c) ...@@ -8,6 +8,7 @@ function c63049052.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c63049052.condition) e1:SetCondition(c63049052.condition)
e1:SetCost(c63049052.cost)
e1:SetTarget(c63049052.target) e1:SetTarget(c63049052.target)
e1:SetOperation(c63049052.operation) e1:SetOperation(c63049052.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,12 +16,36 @@ end ...@@ -15,12 +16,36 @@ end
function c63049052.condition(e,tp,eg,ep,ev,re,r,rp) function c63049052.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 c63049052.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c63049052.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c63049052.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c63049052.filter(c) function c63049052.filter(c)
return c:IsFaceup() and c:GetRank()==4 return c:IsFaceup() and c:GetRank()==4
end end
function c63049052.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c63049052.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c63049052.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c63049052.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c63049052.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c63049052.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c63049052.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c63049052.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
...@@ -28,10 +53,10 @@ end ...@@ -28,10 +53,10 @@ end
function c63049052.operation(e,tp,eg,ep,ev,re,r,rp) function c63049052.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atk up --Atk up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -58,6 +83,8 @@ function c63049052.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,6 +83,8 @@ function c63049052.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(c63049052.eqlimit) e3:SetValue(c63049052.eqlimit)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end end
end end
function c63049052.atkval(e,c) function c63049052.atkval(e,c)
......
...@@ -8,6 +8,7 @@ function c6691855.initial_effect(c) ...@@ -8,6 +8,7 @@ function c6691855.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c6691855.condition) e1:SetCondition(c6691855.condition)
e1:SetCost(c6691855.cost)
e1:SetTarget(c6691855.target) e1:SetTarget(c6691855.target)
e1:SetOperation(c6691855.operation) e1:SetOperation(c6691855.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,12 +16,36 @@ end ...@@ -15,12 +16,36 @@ end
function c6691855.condition(e,tp,eg,ep,ev,re,r,rp) function c6691855.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 c6691855.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c6691855.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c6691855.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c6691855.filter(c) function c6691855.filter(c)
return c:IsFaceup() return c:IsFaceup()
end end
function c6691855.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c6691855.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c6691855.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c6691855.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c6691855.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c6691855.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c6691855.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c6691855.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
...@@ -28,10 +53,10 @@ end ...@@ -28,10 +53,10 @@ end
function c6691855.operation(e,tp,eg,ep,ev,re,r,rp) function c6691855.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup --Atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -55,6 +80,8 @@ function c6691855.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,6 +80,8 @@ function c6691855.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(1) e3:SetValue(1)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end end
end end
function c6691855.defcon(e) function c6691855.defcon(e)
......
...@@ -8,6 +8,7 @@ function c68054593.initial_effect(c) ...@@ -8,6 +8,7 @@ function c68054593.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c68054593.condition) e1:SetCondition(c68054593.condition)
e1:SetCost(c68054593.cost)
e1:SetTarget(c68054593.target) e1:SetTarget(c68054593.target)
e1:SetOperation(c68054593.operation) e1:SetOperation(c68054593.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,23 +16,47 @@ end ...@@ -15,23 +16,47 @@ end
function c68054593.condition(e,tp,eg,ep,ev,re,r,rp) function c68054593.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 c68054593.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c68054593.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c68054593.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c68054593.filter(c) function c68054593.filter(c)
return c:IsFaceup() return c:IsFaceup()
end end
function c68054593.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c68054593.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c68054593.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c68054593.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c68054593.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c68054593.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c68054593.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c68054593.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c68054593.operation(e,tp,eg,ep,ev,re,r,rp) function c68054593.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup --Atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -48,6 +73,8 @@ function c68054593.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,6 +73,8 @@ function c68054593.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(c68054593.eqlimit) e2:SetValue(c68054593.eqlimit)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else
c:CancelToGrave(false)
end end
end end
function c68054593.eqlimit(e,c) function c68054593.eqlimit(e,c)
......
...@@ -8,6 +8,7 @@ function c68540058.initial_effect(c) ...@@ -8,6 +8,7 @@ function c68540058.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c68540058.condition) e1:SetCondition(c68540058.condition)
e1:SetCost(c68540058.cost)
e1:SetTarget(c68540058.target) e1:SetTarget(c68540058.target)
e1:SetOperation(c68540058.operation) e1:SetOperation(c68540058.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,23 +16,47 @@ end ...@@ -15,23 +16,47 @@ end
function c68540058.condition(e,tp,eg,ep,ev,re,r,rp) function c68540058.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 c68540058.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c68540058.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c68540058.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c68540058.filter(c) function c68540058.filter(c)
return c:IsFaceup() return c:IsFaceup()
end end
function c68540058.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c68540058.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c68540058.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c68540058.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c68540058.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c68540058.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c68540058.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c68540058.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c68540058.operation(e,tp,eg,ep,ev,re,r,rp) function c68540058.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup --Atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -58,6 +83,8 @@ function c68540058.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,6 +83,8 @@ function c68540058.operation(e,tp,eg,ep,ev,re,r,rp)
e4:SetValue(c68540058.atkval) e4:SetValue(c68540058.atkval)
e4:SetReset(RESET_EVENT+0x1fe0000) e4:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e4) c:RegisterEffect(e4)
else
c:CancelToGrave(false)
end end
end end
function c68540058.atkcon(e) function c68540058.atkcon(e)
......
...@@ -8,6 +8,7 @@ function c75361204.initial_effect(c) ...@@ -8,6 +8,7 @@ function c75361204.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c75361204.condition) e1:SetCondition(c75361204.condition)
e1:SetCost(c75361204.cost)
e1:SetTarget(c75361204.target) e1:SetTarget(c75361204.target)
e1:SetOperation(c75361204.operation) e1:SetOperation(c75361204.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,9 +16,33 @@ end ...@@ -15,9 +16,33 @@ end
function c75361204.condition(e,tp,eg,ep,ev,re,r,rp) function c75361204.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 c75361204.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c75361204.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c75361204.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c75361204.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c75361204.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
...@@ -25,10 +50,10 @@ end ...@@ -25,10 +50,10 @@ end
function c75361204.operation(e,tp,eg,ep,ev,re,r,rp) function c75361204.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
...@@ -54,6 +79,8 @@ function c75361204.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,6 +79,8 @@ function c75361204.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetOperation(c75361204.spop) e3:SetOperation(c75361204.spop)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end end
end end
function c75361204.spcon(e,tp,eg,ep,ev,re,r,rp) function c75361204.spcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -7,6 +7,7 @@ function c75987257.initial_effect(c) ...@@ -7,6 +7,7 @@ function c75987257.initial_effect(c)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c75987257.condition) e1:SetCondition(c75987257.condition)
e1:SetCost(c75987257.cost)
e1:SetTarget(c75987257.target) e1:SetTarget(c75987257.target)
e1:SetOperation(c75987257.operation) e1:SetOperation(c75987257.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -25,6 +26,29 @@ end ...@@ -25,6 +26,29 @@ end
function c75987257.condition(e,tp,eg,ep,ev,re,r,rp) function c75987257.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c75987257.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c75987257.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c75987257.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c75987257.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c75987257.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if chkc then return chkc==tc end if chkc then return chkc==tc end
...@@ -38,9 +62,8 @@ function c75987257.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,9 +62,8 @@ function c75987257.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED) then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Equip limit --Equip limit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -51,6 +74,8 @@ function c75987257.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,6 +74,8 @@ function c75987257.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
else
c:CancelToGrave(false)
end end
end end
function c75987257.eqlimit(e,c) function c75987257.eqlimit(e,c)
......
...@@ -6,6 +6,7 @@ function c78586116.initial_effect(c) ...@@ -6,6 +6,7 @@ function c78586116.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c78586116.cost)
e1:SetTarget(c78586116.target) e1:SetTarget(c78586116.target)
e1:SetOperation(c78586116.operation) e1:SetOperation(c78586116.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -20,23 +21,47 @@ function c78586116.initial_effect(c) ...@@ -20,23 +21,47 @@ function c78586116.initial_effect(c)
e2:SetOperation(c78586116.atop) e2:SetOperation(c78586116.atop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c78586116.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c78586116.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c78586116.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c78586116.filter(c) function c78586116.filter(c)
return c:IsFaceup() and c:IsSetCard(0x26) return c:IsFaceup() and c:IsSetCard(0x26)
end end
function c78586116.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c78586116.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c78586116.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c78586116.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c78586116.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c78586116.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c78586116.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c78586116.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c78586116.operation(e,tp,eg,ep,ev,re,r,rp) function c78586116.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup --Atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -52,6 +77,8 @@ function c78586116.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,6 +77,8 @@ function c78586116.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+78586116,e,0,0,0,0,0) Duel.RaiseSingleEvent(c,EVENT_CUSTOM+78586116,e,0,0,0,0,0)
else
c:CancelToGrave(false)
end end
end end
function c78586116.eqlimit(e,c) function c78586116.eqlimit(e,c)
...@@ -62,7 +89,7 @@ function c78586116.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -62,7 +89,7 @@ function c78586116.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=eq end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=eq end
if chk==0 then return eq and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,eq) end if chk==0 then return eq and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,eq) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,eq) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,eq)
end end
function c78586116.atop(e,tp,eg,ep,ev,re,r,rp) function c78586116.atop(e,tp,eg,ep,ev,re,r,rp)
local eq=e:GetHandler():GetEquipTarget() local eq=e:GetHandler():GetEquipTarget()
......
...@@ -6,6 +6,7 @@ function c80143954.initial_effect(c) ...@@ -6,6 +6,7 @@ function c80143954.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c80143954.cost)
e1:SetTarget(c80143954.target) e1:SetTarget(c80143954.target)
e1:SetOperation(c80143954.activate) e1:SetOperation(c80143954.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -19,22 +20,47 @@ function c80143954.initial_effect(c) ...@@ -19,22 +20,47 @@ function c80143954.initial_effect(c)
e2:SetOperation(c80143954.repop) e2:SetOperation(c80143954.repop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c80143954.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c80143954.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c80143954.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c80143954.filter(c) function c80143954.filter(c)
return c:IsFaceup() and c:IsSetCard(0x103) return c:IsFaceup() and c:IsSetCard(0x103)
end end
function c80143954.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c80143954.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c80143954.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c80143954.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c80143954.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c80143954.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c80143954.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c80143954.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c80143954.activate(e,tp,eg,ep,ev,re,r,rp) function c80143954.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
...@@ -57,6 +83,8 @@ function c80143954.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,6 +83,8 @@ function c80143954.activate(e,tp,eg,ep,ev,re,r,rp)
e4:SetOperation(c80143954.negop) e4:SetOperation(c80143954.negop)
e4:SetReset(RESET_EVENT+0x1fe0000) e4:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e4) c:RegisterEffect(e4)
else
c:CancelToGrave(false)
end end
end end
function c80143954.eqlimit(e,c) function c80143954.eqlimit(e,c)
......
...@@ -6,13 +6,38 @@ function c87043568.initial_effect(c) ...@@ -6,13 +6,38 @@ function c87043568.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c87043568.cost)
e1:SetTarget(c87043568.target) e1:SetTarget(c87043568.target)
e1:SetOperation(c87043568.operation) e1:SetOperation(c87043568.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c87043568.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c87043568.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c87043568.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c87043568.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c87043568.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
...@@ -20,10 +45,10 @@ end ...@@ -20,10 +45,10 @@ end
function c87043568.operation(e,tp,eg,ep,ev,re,r,rp) function c87043568.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--atkup --atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87043568,0)) e1:SetDescription(aux.Stringid(87043568,0))
...@@ -48,6 +73,8 @@ function c87043568.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,6 +73,8 @@ function c87043568.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetLabelObject(tc) e2:SetLabelObject(tc)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else
c:CancelToGrave(false)
end end
end end
function c87043568.eqlimit(e,c) function c87043568.eqlimit(e,c)
......
...@@ -8,11 +8,14 @@ function c98239899.initial_effect(c) ...@@ -8,11 +8,14 @@ function c98239899.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c98239899.condition) e1:SetCondition(c98239899.condition)
e1:SetCost(c98239899.cost)
e1:SetTarget(c98239899.target) e1:SetTarget(c98239899.target)
e1:SetOperation(c98239899.operation) e1:SetOperation(c98239899.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98239899,0)) e2:SetDescription(aux.Stringid(98239899,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
...@@ -24,23 +27,47 @@ end ...@@ -24,23 +27,47 @@ end
function c98239899.condition(e,tp,eg,ep,ev,re,r,rp) function c98239899.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 c98239899.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c98239899.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c98239899.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c98239899.filter(c) function c98239899.filter(c)
return c:IsFaceup() return c:IsFaceup()
end end
function c98239899.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c98239899.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c98239899.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c98239899.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98239899.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c98239899.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c98239899.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c98239899.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c98239899.operation(e,tp,eg,ep,ev,re,r,rp) function c98239899.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup --Atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
...@@ -56,6 +83,8 @@ function c98239899.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,6 +83,8 @@ function c98239899.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(c98239899.eqlimit) e2:SetValue(c98239899.eqlimit)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else
c:CancelToGrave(false)
end end
end end
function c98239899.eqlimit(e,c) function c98239899.eqlimit(e,c)
......
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