Commit 0f6a4c77 authored by DailyShana's avatar DailyShana

update EVENT_LEAVE_FIELD

parent 3ecc10be
......@@ -9,17 +9,11 @@ function c13803864.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetCondition(c13803864.spcon)
e1:SetTarget(c13803864.sptg)
e1:SetOperation(c13803864.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_REMOVE)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e3)
end
function c13803864.spfilter(c,e,tp)
return c:IsCode(27288416) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -41,8 +41,8 @@ function c14553285.initial_effect(c)
e5:SetDescription(aux.Stringid(14553285,2))
e5:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCode(EVENT_DESTROYED)
e5:SetCondition(c14553285.spcon)
e5:SetTarget(c14553285.sptg)
e5:SetOperation(c14553285.spop)
......@@ -74,7 +74,7 @@ function c14553285.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT)
end
function c14553285.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c14553285.spfilter(c,e,tp)
return c:IsCode(31924889) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -23,8 +23,8 @@ function c1764972.initial_effect(c)
e3:SetDescription(aux.Stringid(1764972,1))
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c1764972.spcon2)
e3:SetTarget(c1764972.sptg2)
e3:SetOperation(c1764972.spop2)
......@@ -101,7 +101,7 @@ function c1764972.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(dg,REASON_EFFECT)
end
function c1764972.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c1764972.spfilter2(c,e,tp)
return c:IsCode(6021033) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -18,17 +18,11 @@ function c19891310.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c19891310.thcon)
e2:SetTarget(c19891310.thtg)
e2:SetOperation(c19891310.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e4)
end
function c19891310.condition(e,tp,eg,ep,ev,re,r,rp)
local bt=Duel.GetAttacker()
......
......@@ -20,17 +20,11 @@ function c28912357.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c28912357.spcon)
e2:SetTarget(c28912357.sptg)
e2:SetOperation(c28912357.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e4)
end
function c28912357.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -42,17 +42,11 @@ function c35952884.initial_effect(c)
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c35952884.sumcon)
e4:SetTarget(c35952884.sumtg)
e4:SetOperation(c35952884.sumop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_REMOVE)
c:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e6)
end
function c35952884.mfilter(c)
return not c:IsType(TYPE_TUNER)
......
......@@ -22,8 +22,8 @@ function c37169670.initial_effect(c)
e3:SetDescription(aux.Stringid(37169670,1))
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c37169670.spcon)
e3:SetTarget(c37169670.sptg)
e3:SetOperation(c37169670.spop)
......@@ -45,7 +45,7 @@ function c37169670.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.RDComplete()
end
function c37169670.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c37169670.spfilter(c,e,tp)
return c:IsCode(95526884) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -30,8 +30,8 @@ function c38898779.initial_effect(c)
e4:SetDescription(aux.Stringid(38898779,1))
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_DESTROYED)
e4:SetCondition(c38898779.spcon)
e4:SetTarget(c38898779.sptg)
e4:SetOperation(c38898779.spop)
......@@ -55,7 +55,7 @@ function c38898779.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsRace,e:GetHandler():GetControler(),LOCATION_GRAVE,0,nil,RACE_WARRIOR)*-100
end
function c38898779.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c38898779.spfilter(c,e,tp)
return c:IsCode(23693634) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -14,15 +14,22 @@ function c39892082.initial_effect(c)
e1:SetOperation(c39892082.addc)
c:RegisterEffect(e1)
--damage
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_LEAVE_FIELD_P)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetOperation(c39892082.regop)
c:RegisterEffect(e0)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(39892082,1))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCondition(c39892082.damcon)
e2:SetTarget(c39892082.damtg)
e2:SetOperation(c39892082.damop)
e2:SetLabelObject(e0)
c:RegisterEffect(e2)
end
function c39892082.addccon(e,tp,eg,ep,ev,re,r,rp)
......@@ -37,11 +44,14 @@ function c39892082.addc(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x29,1)
end
end
function c39892082.regop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetCounter(0x29)
e:SetLabel(ct)
end
function c39892082.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x29)
local ct=e:GetLabelObject():GetLabel()
e:SetLabel(ct)
return ct>0 and c:IsReason(REASON_DESTROY)
return ct>0
end
function c39892082.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -36,7 +36,7 @@ function c39910367.initial_effect(c)
--Add counter2
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetCode(EVENT_LEAVE_FIELD_P)
e6:SetRange(LOCATION_FZONE)
e6:SetOperation(c39910367.addop2)
c:RegisterEffect(e6)
......@@ -65,7 +65,7 @@ function c39910367.addop2(e,tp,eg,ep,ev,re,r,rp)
local count=0
local c=eg:GetFirst()
while c~=nil do
if not c:IsCode(39910367) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) then
if not c:IsCode(39910367) and c:IsLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) then
count=count+c:GetCounter(0x1)
end
c=eg:GetNext()
......
......@@ -15,17 +15,11 @@ function c40854197.initial_effect(c)
e2:SetDescription(aux.Stringid(40854197,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c40854197.descon)
e2:SetTarget(c40854197.destg)
e2:SetOperation(c40854197.desop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e4)
--atkup
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -13,12 +13,19 @@ function c4404099.initial_effect(c)
e1:SetOperation(c4404099.addc)
c:RegisterEffect(e1)
--attackup
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_LEAVE_FIELD_P)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetOperation(c4404099.regop)
c:RegisterEffect(e0)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4404099,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c4404099.atkcon)
e2:SetOperation(c4404099.atkop)
e2:SetLabelObject(e0)
c:RegisterEffect(e2)
end
function c4404099.addct(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -30,9 +37,13 @@ function c4404099.addc(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x23,1)
end
end
function c4404099.atkcon(e,tp,eg,ep,ev,re,r,rp)
function c4404099.regop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetCounter(0x23)
e:SetLabel(ct)
end
function c4404099.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabelObject():GetLabel()
e:SetLabel(ct)
return ct>0 and not e:GetHandler():IsLocation(LOCATION_DECK)
end
function c4404099.filter(c)
......
......@@ -6,6 +6,13 @@ function c51858200.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--search
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_LEAVE_FIELD_P)
e0:SetRange(LOCATION_SZONE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetOperation(c51858200.regop)
c:RegisterEffect(e0)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(51858200,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......@@ -17,6 +24,7 @@ function c51858200.initial_effect(c)
e2:SetCondition(c51858200.thcon)
e2:SetTarget(c51858200.thtg)
e2:SetOperation(c51858200.thop)
e2:SetLabelObject(e0)
c:RegisterEffect(e2)
--fusion summon
local e3=Effect.CreateEffect(c)
......@@ -31,10 +39,15 @@ function c51858200.initial_effect(c)
c:RegisterEffect(e3)
end
function c51858200.cfilter(c)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetCounter(0x1041)>0
return c:IsLocation(LOCATION_MZONE) and c:GetCounter(0x1041)>0
end
function c51858200.regop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c51858200.cfilter,1,nil) then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c51858200.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c51858200.cfilter,1,nil)
return e:GetLabelObject():GetLabel()==1
end
function c51858200.thfilter(c)
return c:IsSetCard(0xf3) and c:IsAbleToHand()
......
......@@ -31,15 +31,22 @@ function c56321639.initial_effect(c)
e3:SetValue(c56321639.atkval)
c:RegisterEffect(e3)
--search
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_LEAVE_FIELD_P)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetOperation(c56321639.regop)
c:RegisterEffect(e5)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(56321639,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c56321639.thcon)
e4:SetTarget(c56321639.thtg)
e4:SetOperation(c56321639.thop)
e4:SetLabelObject(e5)
c:RegisterEffect(e4)
end
function c56321639.ctcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -53,11 +60,16 @@ end
function c56321639.atkval(e,c)
return e:GetHandler():GetCounter(0x1)*100
end
function c56321639.thcon(e,tp,eg,ep,ev,re,r,rp)
function c56321639.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x1)
e:SetLabel(ct)
return ct>0 and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_DESTROY)
end
function c56321639.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabelObject():GetLabel()
e:SetLabel(ct)
return ct>0 and c:IsReason(REASON_DESTROY)
end
function c56321639.filter(c,lv)
return c:IsLevelBelow(lv) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
......
......@@ -37,8 +37,8 @@ function c61257789.initial_effect(c)
e4:SetDescription(aux.Stringid(61257789,2))
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_DESTROYED)
e4:SetCondition(c61257789.spcon)
e4:SetTarget(c61257789.sptg)
e4:SetOperation(c61257789.spop)
......@@ -76,7 +76,7 @@ function c61257789.sumop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c61257789.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c61257789.spfilter(c,e,tp)
return c:IsCode(44508094) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -12,22 +12,33 @@ function c64163367.initial_effect(c)
e2:SetOperation(c64163367.ctop1)
c:RegisterEffect(e2)
--counter2
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_LEAVE_FIELD_P)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetOperation(c64163367.regop)
c:RegisterEffect(e0)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(64163367,0))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c64163367.ctcon2)
e3:SetOperation(c64163367.ctop2)
e3:SetLabelObject(e0)
c:RegisterEffect(e3)
end
function c64163367.ctop1(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(COUNTER_NEED_ENABLE+0x100e,1)
end
function c64163367.ctcon2(e,tp,eg,ep,ev,re,r,rp)
function c64163367.regop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetCounter(0x100e)
e:SetLabel(ct)
return e:GetHandler():IsReason(REASON_DESTROY) and ct>0
end
function c64163367.ctcon2(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabelObject():GetLabel()
e:SetLabel(ct)
return ct>0
end
function c64163367.ctop2(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
......
......@@ -29,17 +29,11 @@ function c65536818.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c65536818.spcon)
e3:SetTarget(c65536818.sptg)
e3:SetOperation(c65536818.spop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e5)
end
function c65536818.thfilter(c)
return c:IsSetCard(0x9e) and c:IsAbleToHand()
......
......@@ -27,14 +27,21 @@ function c75041269.initial_effect(c)
e3:SetCondition(c75041269.dcon)
c:RegisterEffect(e3)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_LEAVE_FIELD_P)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetOperation(c75041269.regop)
c:RegisterEffect(e0)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(75041269,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c75041269.spcon)
e4:SetTarget(c75041269.sptg)
e4:SetOperation(c75041269.spop)
e4:SetLabelObject(e0)
c:RegisterEffect(e4)
end
function c75041269.dcon(e)
......@@ -46,9 +53,14 @@ end
function c75041269.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1b,1)
end
function c75041269.regop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetCounter(0x1b)>=4 then
e:SetLabel(1)
else e:SetLabel(0)
end
function c75041269.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsLocation(LOCATION_GRAVE) and c:GetCounter(0x1b)>=4
return c:IsReason(REASON_DESTROY) and e:GetLabelObject():GetLabel()==1
end
function c75041269.spfilter(c,e,tp)
return c:IsCode(40591390) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -23,8 +23,8 @@ function c77336644.initial_effect(c)
e3:SetDescription(aux.Stringid(77336644,1))
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c77336644.spcon)
e3:SetTarget(c77336644.sptg)
e3:SetOperation(c77336644.spop)
......@@ -43,7 +43,7 @@ function c77336644.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT)
end
function c77336644.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c77336644.spfilter(c,e,tp)
return c:IsCode(70902743) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -25,15 +25,22 @@ function c94243005.initial_effect(c)
e3:SetOperation(c94243005.spop)
c:RegisterEffect(e3)
--search
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_LEAVE_FIELD_P)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetOperation(c94243005.regop)
c:RegisterEffect(e0)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetDescription(aux.Stringid(94243005,1))
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c94243005.thcon)
e4:SetTarget(c94243005.thtg)
e4:SetOperation(c94243005.thop)
e4:SetLabelObject(e0)
c:RegisterEffect(e4)
end
function c94243005.ctfilter(c)
......@@ -65,11 +72,15 @@ function c94243005.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c94243005.regop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetCounter(0x13)
e:SetLabel(ct)
end
function c94243005.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x13)
local ct=e:GetLabelObject():GetLabel()
e:SetLabel(ct)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp
and ct>0 and rp==1-tp and bit.band(r,REASON_EFFECT)~=0
end
function c94243005.thfilter(c,lv)
......
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