Commit 63d8b53d authored by salix5's avatar salix5

EVENT_CARD, EVENT_ADD_COUNTER, EVENT_REMOVE_COUNTER

parent e0ecd780
...@@ -9,7 +9,7 @@ function c18114794.initial_effect(c) ...@@ -9,7 +9,7 @@ function c18114794.initial_effect(c)
e2:SetDescription(aux.Stringid(18114794,0)) e2:SetDescription(aux.Stringid(18114794,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCode(18114794) e2:SetCode(EVENT_CARD+18114794)
e2:SetCondition(c18114794.condition) e2:SetCondition(c18114794.condition)
e2:SetOperation(c18114794.operation) e2:SetOperation(c18114794.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -50,7 +50,7 @@ function c18114794.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,7 @@ function c18114794.checkop(e,tp,eg,ep,ev,re,r,rp)
if p1 then if p1 then
c18114794[turnp]=c18114794[turnp]+1 c18114794[turnp]=c18114794[turnp]+1
if c18114794[turnp]==3 then if c18114794[turnp]==3 then
Duel.RaiseEvent(e:GetHandler(),18114794,e,0,0,0,0) Duel.RaiseEvent(e:GetHandler(),EVENT_CARD+18114794,e,0,0,0,0)
end end
end end
end end
......
...@@ -11,7 +11,7 @@ function c18654201.initial_effect(c) ...@@ -11,7 +11,7 @@ function c18654201.initial_effect(c)
e2:SetDescription(aux.Stringid(18654201,0)) e2:SetDescription(aux.Stringid(18654201,0))
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(18654201) e2:SetCode(EVENT_CARD+18654201)
e2:SetTarget(c18654201.hdtg) e2:SetTarget(c18654201.hdtg)
e2:SetOperation(c18654201.hdop) e2:SetOperation(c18654201.hdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -25,11 +25,11 @@ function c18654201.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,11 +25,11 @@ function c18654201.regop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c18654201.filter,1,nil,1) then p2=true end if eg:IsExists(c18654201.filter,1,nil,1) then p2=true end
local c=e:GetHandler() local c=e:GetHandler()
if p1 and p2 then if p1 and p2 then
Duel.RaiseSingleEvent(c,18654201,re,r,rp,PLAYER_ALL,0) Duel.RaiseSingleEvent(c,EVENT_CARD+18654201,re,r,rp,PLAYER_ALL,0)
elseif p1 then elseif p1 then
Duel.RaiseSingleEvent(c,18654201,re,r,rp,0,0) Duel.RaiseSingleEvent(c,EVENT_CARD+18654201,re,r,rp,0,0)
elseif p2 then elseif p2 then
Duel.RaiseSingleEvent(c,18654201,re,r,rp,1,0) Duel.RaiseSingleEvent(c,EVENT_CARD+18654201,re,r,rp,1,0)
end end
end end
function c18654201.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c18654201.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -24,7 +24,7 @@ function c24857466.initial_effect(c) ...@@ -24,7 +24,7 @@ function c24857466.initial_effect(c)
e4:SetCategory(CATEGORY_DAMAGE) e4:SetCategory(CATEGORY_DAMAGE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(24857466) e4:SetCode(EVENT_CARD+24857466)
e4:SetCondition(c24857466.damcon) e4:SetCondition(c24857466.damcon)
e4:SetTarget(c24857466.damtg) e4:SetTarget(c24857466.damtg)
e4:SetOperation(c24857466.damop) e4:SetOperation(c24857466.damop)
...@@ -89,7 +89,7 @@ function c24857466.hspop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,7 +89,7 @@ function c24857466.hspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local tpe=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) local tpe=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
Duel.RaiseSingleEvent(c,24857466,e,0,0,tp,tpe) Duel.RaiseSingleEvent(c,EVENT_CARD+24857466,e,0,0,tp,tpe)
end end
end end
function c24857466.damcon(e,tp,eg,ep,ev,re,r,rp) function c24857466.damcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -14,7 +14,7 @@ function c27383110.initial_effect(c) ...@@ -14,7 +14,7 @@ function c27383110.initial_effect(c)
e2:SetDescription(aux.Stringid(27383110,0)) e2:SetDescription(aux.Stringid(27383110,0))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(27383110) e2:SetCode(EVENT_CARD+27383110)
e2:SetCost(c27383110.thcost) e2:SetCost(c27383110.thcost)
e2:SetTarget(c27383110.thtg) e2:SetTarget(c27383110.thtg)
e2:SetOperation(c27383110.thop) e2:SetOperation(c27383110.thop)
...@@ -49,7 +49,7 @@ function c27383110.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c27383110.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
e:SetLabelObject(tc) e:SetLabelObject(tc)
Duel.RaiseSingleEvent(e:GetHandler(),27383110,e,0,tp,tp,0) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+27383110,e,0,tp,tp,0)
end end
end end
function c27383110.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c27383110.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -5,7 +5,7 @@ function c27769400.initial_effect(c) ...@@ -5,7 +5,7 @@ function c27769400.initial_effect(c)
e1:SetDescription(aux.Stringid(27769400,0)) e1:SetDescription(aux.Stringid(27769400,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(27769400) e1:SetCode(EVENT_CARD+27769400)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c27769400.spcon) e1:SetCondition(c27769400.spcon)
...@@ -49,7 +49,7 @@ function c27769400.checkop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c27769400.checkop2(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsLocation,nil,LOCATION_GRAVE) local g=eg:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
c27769400[0]:Sub(g) c27769400[0]:Sub(g)
if c27769400[0]:GetCount()==0 then if c27769400[0]:GetCount()==0 then
Duel.RaiseEvent(e:GetHandler(),27769400,e,0,0,0,0) Duel.RaiseEvent(e:GetHandler(),EVENT_CARD+27769400,e,0,0,0,0)
end end
end end
function c27769400.spcon(e,tp,eg,ep,ev,re,r,rp) function c27769400.spcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -17,7 +17,7 @@ function c29146185.initial_effect(c) ...@@ -17,7 +17,7 @@ function c29146185.initial_effect(c)
e2:SetDescription(aux.Stringid(29146185,1)) e2:SetDescription(aux.Stringid(29146185,1))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(29146185) e2:SetCode(EVENT_CARD+29146185)
e2:SetCost(c29146185.descost) e2:SetCost(c29146185.descost)
e2:SetTarget(c29146185.destg) e2:SetTarget(c29146185.destg)
e2:SetOperation(c29146185.desop) e2:SetOperation(c29146185.desop)
...@@ -54,7 +54,7 @@ function c29146185.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +54,7 @@ function c29146185.retop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.RaiseSingleEvent(c,29146185,re,r,rp,0,0) Duel.RaiseSingleEvent(c,EVENT_CARD+29146185,re,r,rp,0,0)
end end
end end
end end
......
...@@ -23,7 +23,8 @@ function c31292357.initial_effect(c) ...@@ -23,7 +23,8 @@ function c31292357.initial_effect(c)
--atk --atk
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(31292357) e3:SetCode(EVENT_ADD_COUNTER+0x3036)
e3:SetCondition(c31292357.atkcon)
e3:SetOperation(c31292357.atkop) e3:SetOperation(c31292357.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
...@@ -39,9 +40,6 @@ end ...@@ -39,9 +40,6 @@ end
function c31292357.ctop(e,tp,eg,ep,ev,re,r,rp) function c31292357.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:AddCounter(0x3036,1)~=0 then if c:IsRelateToEffect(e) and c:AddCounter(0x3036,1)~=0 then
if c:GetCounter(0x3036)==3 then
Duel.RaiseSingleEvent(c,31292357,e,0,0,tp,0)
end
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -61,6 +59,9 @@ function c31292357.damval(e,re,val,r,rp,rc) ...@@ -61,6 +59,9 @@ function c31292357.damval(e,re,val,r,rp,rc)
if cid~=e:GetLabel() then return val end if cid~=e:GetLabel() then return val end
return 0 return 0
end end
function c31292357.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x3036)==3
end
function c31292357.atkop(e,tp,eg,ep,ev,re,r,rp) function c31292357.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -19,7 +19,7 @@ function c32835363.initial_effect(c) ...@@ -19,7 +19,7 @@ function c32835363.initial_effect(c)
e2:SetDescription(aux.Stringid(32835363,0)) e2:SetDescription(aux.Stringid(32835363,0))
e2:SetCategory(CATEGORY_DAMAGE) e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(32835363) e2:SetCode(EVENT_CARD+32835363)
e2:SetTarget(c32835363.damtg) e2:SetTarget(c32835363.damtg)
e2:SetOperation(c32835363.damop) e2:SetOperation(c32835363.damop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -43,7 +43,7 @@ function c32835363.regcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c32835363.regcon(e,tp,eg,ep,ev,re,r,rp)
return evt_p~=PLAYER_NONE return evt_p~=PLAYER_NONE
end end
function c32835363.regop(e,tp,eg,ep,ev,re,r,rp) function c32835363.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(e:GetHandler(),32835363,e,0,tp,e:GetLabel(),0) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+32835363,e,0,tp,e:GetLabel(),0)
end end
function c32835363.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c32835363.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
......
...@@ -16,7 +16,7 @@ function c33698022.initial_effect(c) ...@@ -16,7 +16,7 @@ function c33698022.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetDescription(aux.Stringid(33698022,1)) e2:SetDescription(aux.Stringid(33698022,1))
e2:SetCode(33698022) e2:SetCode(EVENT_CARD+33698022)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--event --event
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -34,7 +34,7 @@ function c33698022.evcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function c33698022.evcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c33698022.cfilter,1,nil,1-tp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(c33698022.cfilter,1,nil,1-tp)
end end
function c33698022.evop(e,tp,eg,ep,ev,re,r,rp) function c33698022.evop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(e:GetHandler(),33698022,re,r,rp,ep,ev) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+33698022,re,r,rp,ep,ev)
end end
function c33698022.filter(c) function c33698022.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsAbleToHand() return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsAbleToHand()
......
...@@ -64,6 +64,7 @@ function c38468214.rmctcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,6 +64,7 @@ function c38468214.rmctcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c38468214.rmctop(e,tp,eg,ep,ev,re,r,rp) function c38468214.rmctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(tp,0xe,1,REASON_EFFECT) e:GetHandler():RemoveCounter(tp,0xe,1,REASON_EFFECT)
Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0xe,e,REASON_EFFECT,tp,tp,1)
end end
function c38468214.descon(e) function c38468214.descon(e)
return e:GetHandler():GetCounter(0xe)==0 return e:GetHandler():GetCounter(0xe)==0
......
...@@ -22,8 +22,13 @@ end ...@@ -22,8 +22,13 @@ end
function c38834303.activate(e,tp,eg,ep,ev,re,r,rp) function c38834303.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c38834303.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local sg=Duel.GetMatchingGroup(c38834303.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local tc=sg:GetFirst() local tc=sg:GetFirst()
local count=0
while tc do while tc do
count=count+tc:GetCounter(0xe)
tc:RemoveCounter(tp,0,0,0) tc:RemoveCounter(tp,0,0,0)
tc=sg:GetNext() tc=sg:GetNext()
end end
if count>0 then
Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0xe,e,REASON_EFFECT,tp,tp,count)
end
end end
...@@ -14,7 +14,7 @@ function c39261576.initial_effect(c) ...@@ -14,7 +14,7 @@ function c39261576.initial_effect(c)
e2:SetDescription(aux.Stringid(39261576,0)) e2:SetDescription(aux.Stringid(39261576,0))
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(39261576) e2:SetCode(EVENT_CARD+39261576)
e2:SetCost(c39261576.atkcost) e2:SetCost(c39261576.atkcost)
e2:SetTarget(c39261576.atktg) e2:SetTarget(c39261576.atktg)
e2:SetOperation(c39261576.atkop) e2:SetOperation(c39261576.atkop)
...@@ -72,13 +72,13 @@ function c39261576.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,13 +72,13 @@ function c39261576.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
e:SetLabelObject(tc) e:SetLabelObject(tc)
Duel.RaiseSingleEvent(e:GetHandler(),39261576,e,0,tp,tp,0) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+39261576,e,0,tp,tp,0)
else else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
e:SetLabelObject(tc) e:SetLabelObject(tc)
Duel.RaiseSingleEvent(e:GetHandler(),39261576,e,0,tp,tp,0) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+39261576,e,0,tp,tp,0)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
end end
......
...@@ -15,7 +15,7 @@ function c41493640.initial_effect(c) ...@@ -15,7 +15,7 @@ function c41493640.initial_effect(c)
e2:SetDescription(aux.Stringid(41493640,1)) e2:SetDescription(aux.Stringid(41493640,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(41493640) e2:SetCode(EVENT_CARD+41493640)
e2:SetTarget(c41493640.sptg) e2:SetTarget(c41493640.sptg)
e2:SetOperation(c41493640.spop) e2:SetOperation(c41493640.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -36,7 +36,7 @@ function c41493640.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function c41493640.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(tp,tc) Duel.ConfirmCards(tp,tc)
if tc:IsType(TYPE_TRAP) and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsType(TYPE_TRAP) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.RaiseSingleEvent(c,41493640,e,0,tp,tp,0) Duel.RaiseSingleEvent(c,EVENT_CARD+41493640,e,0,tp,tp,0)
end end
end end
end end
......
...@@ -21,7 +21,7 @@ function c45894482.initial_effect(c) ...@@ -21,7 +21,7 @@ function c45894482.initial_effect(c)
e3:SetDescription(aux.Stringid(45894482,0)) e3:SetDescription(aux.Stringid(45894482,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_EVENT_PLAYER) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_EVENT_PLAYER)
e3:SetCode(45894482) e3:SetCode(EVENT_CARD+45894482)
e3:SetTarget(c45894482.target) e3:SetTarget(c45894482.target)
e3:SetOperation(c45894482.operation) e3:SetOperation(c45894482.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -32,7 +32,7 @@ function c45894482.spcon(e,c) ...@@ -32,7 +32,7 @@ function c45894482.spcon(e,c)
end end
function c45894482.trigop(e,tp,eg,ep,ev,re,r,rp) function c45894482.trigop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 then if e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 then
Duel.RaiseSingleEvent(e:GetHandler(),45894482,e,r,rp,1-tp,0) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+45894482,e,r,rp,1-tp,0)
end end
end end
function c45894482.filter(c,e,tp) function c45894482.filter(c,e,tp)
......
...@@ -11,7 +11,7 @@ function c47408488.initial_effect(c) ...@@ -11,7 +11,7 @@ function c47408488.initial_effect(c)
e2:SetDescription(aux.Stringid(47408488,0)) e2:SetDescription(aux.Stringid(47408488,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCode(47408488) e2:SetCode(EVENT_CARD+47408488)
e2:SetOperation(c47408488.ctop) e2:SetOperation(c47408488.ctop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--equip --equip
...@@ -72,6 +72,6 @@ function c47408488.plop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,6 +72,6 @@ function c47408488.plop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
tc=g:GetNext() tc=g:GetNext()
end end
Duel.RaiseEvent(g,47408488,e,0,tp,0,0) Duel.RaiseEvent(g,EVENT_CARD+47408488,e,0,tp,0,0)
end end
end end
...@@ -51,7 +51,7 @@ function c49352945.initial_effect(c) ...@@ -51,7 +51,7 @@ function c49352945.initial_effect(c)
e6:SetDescription(aux.Stringid(49352945,2)) e6:SetDescription(aux.Stringid(49352945,2))
e6:SetCategory(CATEGORY_TODECK) e6:SetCategory(CATEGORY_TODECK)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(49352945) e6:SetCode(EVENT_CARD+49352945)
e6:SetTarget(c49352945.tdtg) e6:SetTarget(c49352945.tdtg)
e6:SetOperation(c49352945.tdop) e6:SetOperation(c49352945.tdop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
...@@ -126,7 +126,7 @@ function c49352945.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -126,7 +126,7 @@ function c49352945.retop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.SendtoDeck(c,nil,2,REASON_EFFECT) Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
if c:IsLocation(LOCATION_EXTRA) then if c:IsLocation(LOCATION_EXTRA) then
Duel.RaiseSingleEvent(c,49352945,e,0,0,0,0) Duel.RaiseSingleEvent(c,EVENT_CARD+49352945,e,0,0,0,0)
end end
end end
function c49352945.desfilter(c) function c49352945.desfilter(c)
......
...@@ -28,7 +28,7 @@ function c53039326.initial_effect(c) ...@@ -28,7 +28,7 @@ function c53039326.initial_effect(c)
e4:SetDescription(aux.Stringid(53039326,2)) e4:SetDescription(aux.Stringid(53039326,2))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_EVENT_PLAYER) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_EVENT_PLAYER)
e4:SetCode(53039326) e4:SetCode(EVENT_CARD+53039326)
e4:SetTarget(c53039326.target) e4:SetTarget(c53039326.target)
e4:SetOperation(c53039326.operation) e4:SetOperation(c53039326.operation)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -69,8 +69,8 @@ function c53039326.check(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,8 +69,8 @@ function c53039326.check(e,tp,eg,ep,ev,re,r,rp)
end end
tc=eg:GetNext() tc=eg:GetNext()
end end
if b1 then Duel.RaiseSingleEvent(c,53039326,e,r,rp,turnp,0) end if b1 then Duel.RaiseSingleEvent(c,EVENT_CARD+53039326,e,r,rp,turnp,0) end
if b2 then Duel.RaiseSingleEvent(c,53039326,e,r,rp,1-turnp,0) end if b2 then Duel.RaiseSingleEvent(c,EVENT_CARD+53039326,e,r,rp,1-turnp,0) end
end end
function c53039326.filter(c) function c53039326.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1d) and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1d) and c:IsAbleToHand()
......
...@@ -28,7 +28,7 @@ function c54306223.initial_effect(c) ...@@ -28,7 +28,7 @@ function c54306223.initial_effect(c)
e4:SetDescription(aux.Stringid(54306223,1)) e4:SetDescription(aux.Stringid(54306223,1))
e4:SetCategory(CATEGORY_DESTROY) e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(54306223) e4:SetCode(EVENT_CARD+54306223)
e4:SetRange(LOCATION_FZONE) e4:SetRange(LOCATION_FZONE)
e4:SetTarget(c54306223.destg) e4:SetTarget(c54306223.destg)
e4:SetOperation(c54306223.desop) e4:SetOperation(c54306223.desop)
...@@ -61,7 +61,7 @@ function c54306223.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,7 @@ function c54306223.acop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.RaiseEvent(g,54306223,e,0,0,0,0) Duel.RaiseEvent(g,EVENT_CARD+54306223,e,0,0,0,0)
end end
end end
function c54306223.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c54306223.destg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -83,4 +83,5 @@ end ...@@ -83,4 +83,5 @@ end
function c59258334.rcop(e,tp,eg,ep,ev,re,r,rp) function c59258334.rcop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget() local tc=e:GetHandler():GetFirstCardTarget()
tc:RemoveCounter(tp,0xe,1,REASON_EFFECT) tc:RemoveCounter(tp,0xe,1,REASON_EFFECT)
Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0xe,e,REASON_EFFECT,tp,tp,1)
end end
...@@ -11,7 +11,7 @@ function c67048711.initial_effect(c) ...@@ -11,7 +11,7 @@ function c67048711.initial_effect(c)
e2:SetDescription(aux.Stringid(67048711,0)) e2:SetDescription(aux.Stringid(67048711,0))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(67048711) e2:SetCode(EVENT_CARD+67048711)
e2:SetTarget(c67048711.drtg) e2:SetTarget(c67048711.drtg)
e2:SetOperation(c67048711.drop) e2:SetOperation(c67048711.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -33,7 +33,7 @@ end ...@@ -33,7 +33,7 @@ end
function c67048711.operation(e,tp,eg,ep,ev,re,r,rp) function c67048711.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetMatchingGroupCount(c67048711.filter,tp,LOCATION_SZONE,0,nil)==3 then if Duel.GetMatchingGroupCount(c67048711.filter,tp,LOCATION_SZONE,0,nil)==3 then
Duel.RaiseSingleEvent(e:GetHandler(),67048711,e,0,0,0,0) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+67048711,e,0,0,0,0)
end end
end end
function c67048711.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c67048711.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -47,7 +47,7 @@ function c69954399.initial_effect(c) ...@@ -47,7 +47,7 @@ function c69954399.initial_effect(c)
e6:SetDescription(aux.Stringid(69954399,1)) e6:SetDescription(aux.Stringid(69954399,1))
e6:SetCategory(CATEGORY_TOHAND) e6:SetCategory(CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(69954400) e6:SetCode(EVENT_CARD+69954400)
e6:SetTarget(c69954399.rettg) e6:SetTarget(c69954399.rettg)
e6:SetOperation(c69954399.retop) e6:SetOperation(c69954399.retop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
...@@ -87,7 +87,7 @@ end ...@@ -87,7 +87,7 @@ end
function c69954399.desop(e,tp,eg,ep,ev,re,r,rp) function c69954399.desop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
if ec and ec:IsRelateToEffect(e) and Duel.Destroy(ec,REASON_EFFECT)~=0 then if ec and ec:IsRelateToEffect(e) and Duel.Destroy(ec,REASON_EFFECT)~=0 then
Duel.RaiseSingleEvent(e:GetHandler(),69954400,e,0,0,0,0) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+69954400,e,0,0,0,0)
end end
end end
function c69954399.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c69954399.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -24,7 +24,7 @@ function c71625222.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,7 +24,7 @@ function c71625222.desop(e,tp,eg,ep,ev,re,r,rp)
if coin~=res then if coin~=res then
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
Duel.RaiseEvent(e:GetHandler(),71625222,e,0,0,tp,0) Duel.RaiseEvent(e:GetHandler(),EVENT_CARD+71625222,e,0,0,tp,0)
else else
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
......
...@@ -11,7 +11,7 @@ function c71645242.initial_effect(c) ...@@ -11,7 +11,7 @@ function c71645242.initial_effect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetRange(LOCATION_FZONE) e4:SetRange(LOCATION_FZONE)
e4:SetCode(71645242) e4:SetCode(EVENT_CARD+71645242)
e4:SetTarget(c71645242.sptg) e4:SetTarget(c71645242.sptg)
e4:SetOperation(c71645242.spop) e4:SetOperation(c71645242.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -53,7 +53,7 @@ function c71645242.regcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function c71645242.regcon(e,tp,eg,ep,ev,re,r,rp)
return sf~=0 return sf~=0
end end
function c71645242.regop(e,tp,eg,ep,ev,re,r,rp) function c71645242.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,71645242,e,r,rp,ep,e:GetLabel()) Duel.RaiseEvent(eg,EVENT_CARD+71645242,e,r,rp,ep,e:GetLabel())
end end
function c71645242.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c71645242.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
......
...@@ -22,7 +22,7 @@ function c7409792.initial_effect(c) ...@@ -22,7 +22,7 @@ function c7409792.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_EVENT_PLAYER) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_EVENT_PLAYER)
e3:SetCode(7409792) e3:SetCode(EVENT_CARD+7409792)
e3:SetTarget(c7409792.target) e3:SetTarget(c7409792.target)
e3:SetOperation(c7409792.operation) e3:SetOperation(c7409792.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -34,7 +34,7 @@ function c7409792.spcon(e,c) ...@@ -34,7 +34,7 @@ function c7409792.spcon(e,c)
end end
function c7409792.trigop(e,tp,eg,ep,ev,re,r,rp) function c7409792.trigop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 then if e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 then
Duel.RaiseSingleEvent(e:GetHandler(),7409792,e,r,rp,1-tp,0) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+7409792,e,r,rp,1-tp,0)
end end
end end
function c7409792.filter(c,e,tp) function c7409792.filter(c,e,tp)
......
...@@ -21,7 +21,7 @@ function c75782277.initial_effect(c) ...@@ -21,7 +21,7 @@ function c75782277.initial_effect(c)
e4:SetDescription(aux.Stringid(75782277,0)) e4:SetDescription(aux.Stringid(75782277,0))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_EVENT_PLAYER) e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_EVENT_PLAYER)
e4:SetCode(75782277) e4:SetCode(EVENT_CARD+75782277)
e4:SetTarget(c75782277.target) e4:SetTarget(c75782277.target)
e4:SetOperation(c75782277.operation) e4:SetOperation(c75782277.operation)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -48,8 +48,8 @@ function c75782277.check(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,8 +48,8 @@ function c75782277.check(e,tp,eg,ep,ev,re,r,rp)
end end
tc=eg:GetNext() tc=eg:GetNext()
end end
if tp1 then Duel.RaiseSingleEvent(c,75782277,e,r,rp,tp,0) end if tp1 then Duel.RaiseSingleEvent(c,EVENT_CARD+75782277,e,r,rp,tp,0) end
if tp2 then Duel.RaiseSingleEvent(c,75782277,e,r,rp,1-tp,0) end if tp2 then Duel.RaiseSingleEvent(c,EVENT_CARD+75782277,e,r,rp,1-tp,0) end
end end
function c75782277.filter(c) function c75782277.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
......
...@@ -16,7 +16,7 @@ function c77631175.initial_effect(c) ...@@ -16,7 +16,7 @@ function c77631175.initial_effect(c)
e2:SetDescription(aux.Stringid(77631175,1)) e2:SetDescription(aux.Stringid(77631175,1))
e2:SetCategory(CATEGORY_DAMAGE) e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(77631175) e2:SetCode(EVENT_CARD+77631175)
e2:SetTarget(c77631175.target) e2:SetTarget(c77631175.target)
e2:SetOperation(c77631175.operation) e2:SetOperation(c77631175.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -26,7 +26,7 @@ function c77631175.reptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,7 +26,7 @@ function c77631175.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.SelectYesNo(tp,aux.Stringid(77631175,0)) then if Duel.SelectYesNo(tp,aux.Stringid(77631175,0)) then
local c=e:GetHandler() local c=e:GetHandler()
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
Duel.RaiseSingleEvent(c,77631175,e,0,0,0,0) Duel.RaiseSingleEvent(c,EVENT_CARD+77631175,e,0,0,0,0)
return true return true
else return false end else return false end
end end
......
...@@ -49,7 +49,7 @@ function c78512663.initial_effect(c) ...@@ -49,7 +49,7 @@ function c78512663.initial_effect(c)
e6:SetDescription(aux.Stringid(78512663,1)) e6:SetDescription(aux.Stringid(78512663,1))
e6:SetCategory(CATEGORY_TOHAND) e6:SetCategory(CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(78512663) e6:SetCode(EVENT_CARD+78512663)
e6:SetTarget(c78512663.thtg) e6:SetTarget(c78512663.thtg)
e6:SetOperation(c78512663.thop) e6:SetOperation(c78512663.thop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
...@@ -127,7 +127,7 @@ function c78512663.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -127,7 +127,7 @@ function c78512663.retop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.SendtoDeck(c,nil,2,REASON_EFFECT) Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
if c:IsLocation(LOCATION_EXTRA) then if c:IsLocation(LOCATION_EXTRA) then
Duel.RaiseSingleEvent(c,78512663,e,0,0,0,0) Duel.RaiseSingleEvent(c,EVENT_CARD+78512663,e,0,0,0,0)
end end
end end
function c78512663.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c78512663.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -14,7 +14,7 @@ function c78586116.initial_effect(c) ...@@ -14,7 +14,7 @@ function c78586116.initial_effect(c)
e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetDescription(aux.Stringid(78586116,0)) e2:SetDescription(aux.Stringid(78586116,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(78586116) e2:SetCode(EVENT_CARD+78586116)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c78586116.attg) e2:SetTarget(c78586116.attg)
e2:SetOperation(c78586116.atop) e2:SetOperation(c78586116.atop)
...@@ -51,7 +51,7 @@ function c78586116.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c78586116.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(c78586116.eqlimit) e2:SetValue(c78586116.eqlimit)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
Duel.RaiseSingleEvent(c,78586116,e,0,0,0,0,0) Duel.RaiseSingleEvent(c,EVENT_CARD+78586116,e,0,0,0,0,0)
end end
end end
function c78586116.eqlimit(e,c) function c78586116.eqlimit(e,c)
......
...@@ -14,7 +14,7 @@ function c79569173.initial_effect(c) ...@@ -14,7 +14,7 @@ function c79569173.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(79569173) e2:SetCode(EVENT_CARD+79569173)
e2:SetTarget(c79569173.thtg) e2:SetTarget(c79569173.thtg)
e2:SetOperation(c79569173.thop) e2:SetOperation(c79569173.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -64,7 +64,7 @@ function c79569173.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function c79569173.desop(e,tp,eg,ep,ev,re,r,rp)
ct=ct+1 ct=ct+1
c:SetTurnCounter(ct) c:SetTurnCounter(ct)
if ct==3 and Duel.Destroy(c,REASON_EFFECT)>0 then if ct==3 and Duel.Destroy(c,REASON_EFFECT)>0 then
Duel.RaiseSingleEvent(e:GetHandler(),79569173,e,0,tp,tp,0) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+79569173,e,0,tp,tp,0)
end end
end end
function c79569173.disop(e,tp) function c79569173.disop(e,tp)
......
...@@ -18,7 +18,7 @@ function c80402389.initial_effect(c) ...@@ -18,7 +18,7 @@ function c80402389.initial_effect(c)
e3:SetDescription(aux.Stringid(80402389,0)) e3:SetDescription(aux.Stringid(80402389,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_EVENT_PLAYER) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_EVENT_PLAYER)
e3:SetCode(80402389) e3:SetCode(EVENT_CARD+80402389)
e3:SetTarget(c80402389.target) e3:SetTarget(c80402389.target)
e3:SetOperation(c80402389.operation) e3:SetOperation(c80402389.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -29,7 +29,7 @@ function c80402389.check(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,7 @@ function c80402389.check(e,tp,eg,ep,ev,re,r,rp)
while tc do while tc do
if tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsReason(REASON_DESTROY) if tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsReason(REASON_DESTROY)
and tc:IsRace(RACE_INSECT) and tc:GetLevel()~=0 and tc:IsPreviousPosition(POS_FACEUP) then and tc:IsRace(RACE_INSECT) and tc:GetLevel()~=0 and tc:IsPreviousPosition(POS_FACEUP) then
Duel.RaiseSingleEvent(c,80402389,e,r,rp,tc:GetControler(),tc:GetLevel()) Duel.RaiseSingleEvent(c,EVENT_CARD+80402389,e,r,rp,tc:GetControler(),tc:GetLevel())
end end
tc=eg:GetNext() tc=eg:GetNext()
end end
......
...@@ -5,7 +5,7 @@ function c82670878.initial_effect(c) ...@@ -5,7 +5,7 @@ function c82670878.initial_effect(c)
e1:SetDescription(aux.Stringid(82670878,0)) e1:SetDescription(aux.Stringid(82670878,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(82670878) e1:SetCode(EVENT_CARD+82670878)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c82670878.condition) e1:SetCondition(c82670878.condition)
e1:SetTarget(c82670878.target) e1:SetTarget(c82670878.target)
...@@ -49,7 +49,7 @@ function c82670878.check(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c82670878.check(e,tp,eg,ep,ev,re,r,rp)
c82670878[2]=tc c82670878[2]=tc
tc:RegisterFlagEffect(82670878,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) tc:RegisterFlagEffect(82670878,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
elseif c82670878[1-tc:GetControler()]==2 then elseif c82670878[1-tc:GetControler()]==2 then
Duel.RaiseEvent(tc,82670878,e,0,0,0,0) Duel.RaiseEvent(tc,EVENT_CARD+82670878,e,0,0,0,0)
end end
end end
end end
......
...@@ -8,7 +8,7 @@ function c92377303.initial_effect(c) ...@@ -8,7 +8,7 @@ function c92377303.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND+LOCATION_DECK) e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE) e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCode(71625222) e1:SetCode(EVENT_CARD+71625222)
e1:SetCondition(c92377303.spcon) e1:SetCondition(c92377303.spcon)
e1:SetCost(c92377303.cost) e1:SetCost(c92377303.cost)
e1:SetTarget(c92377303.sptg) e1:SetTarget(c92377303.sptg)
......
...@@ -17,7 +17,7 @@ function c92609670.initial_effect(c) ...@@ -17,7 +17,7 @@ function c92609670.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(92609670,1)) e2:SetDescription(aux.Stringid(92609670,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(92609670) e2:SetCode(EVENT_CARD+92609670)
e2:SetCost(c92609670.lvcost) e2:SetCost(c92609670.lvcost)
e2:SetTarget(c92609670.lvtg) e2:SetTarget(c92609670.lvtg)
e2:SetOperation(c92609670.lvop) e2:SetOperation(c92609670.lvop)
...@@ -46,7 +46,7 @@ function c92609670.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function c92609670.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c92609670.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c92609670.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft,nil,e,tp)
if g:GetCount()>0 and not g:IsExists(Card.IsHasEffect,1,nil,EFFECT_NECRO_VALLEY) then if g:GetCount()>0 and not g:IsExists(Card.IsHasEffect,1,nil,EFFECT_NECRO_VALLEY) then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.RaiseSingleEvent(e:GetHandler(),92609670,e,0,tp,tp,0) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+92609670,e,0,tp,tp,0)
end end
end end
function c92609670.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) function c92609670.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -25,10 +25,19 @@ function c94256039.initial_effect(c) ...@@ -25,10 +25,19 @@ function c94256039.initial_effect(c)
e4:SetDescription(aux.Stringid(94256039,0)) e4:SetDescription(aux.Stringid(94256039,0))
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(94256039) e4:SetCode(EVENT_CARD+94256039)
e4:SetTarget(c94256039.damtg) e4:SetTarget(c94256039.damtg)
e4:SetOperation(c94256039.damop) e4:SetOperation(c94256039.damop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_ADD_COUNTER+0x3001)
e4:SetCondition(c94256039.descon)
e4:SetTarget(c94256039.destg)
e4:SetOperation(c94256039.desop)
c:RegisterEffect(e4)
end end
function c94256039.acop(e,tp,eg,ep,ev,re,r,rp) function c94256039.acop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER) local p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER)
...@@ -36,7 +45,7 @@ function c94256039.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +45,7 @@ function c94256039.acop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and c:GetFlagEffect(1)>0 then if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and c:GetFlagEffect(1)>0 then
c:AddCounter(0x3001,1) c:AddCounter(0x3001,1)
if c:GetCounter(0x3001)==4 then if c:GetCounter(0x3001)==4 then
Duel.RaiseSingleEvent(c,94256039,re,0,0,p,0) Duel.RaiseSingleEvent(c,EVENT_CARD+94256039,re,0,0,p,0)
end end
end end
end end
...@@ -51,3 +60,14 @@ function c94256039.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,3 +60,14 @@ function c94256039.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(ep,3000,REASON_EFFECT) Duel.Damage(ep,3000,REASON_EFFECT)
end end
end end
function c94256039.descon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler() and e:GetHandler():GetCounter(0x3001)>=4
end
function c94256039.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c94256039.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
...@@ -26,7 +26,7 @@ function c94585852.initial_effect(c) ...@@ -26,7 +26,7 @@ function c94585852.initial_effect(c)
e4:SetCategory(CATEGORY_TOHAND) e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_EVENT_PLAYER+EFFECT_FLAG_DAMAGE_STEP) e4:SetProperty(EFFECT_FLAG_EVENT_PLAYER+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(94585852) e4:SetCode(EVENT_CARD+94585852)
e4:SetTarget(c94585852.target) e4:SetTarget(c94585852.target)
e4:SetOperation(c94585852.operation) e4:SetOperation(c94585852.operation)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -53,8 +53,8 @@ function c94585852.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,8 +53,8 @@ function c94585852.regop(e,tp,eg,ep,ev,re,r,rp)
end end
tc=eg:GetNext() tc=eg:GetNext()
end end
if lv1>0 then Duel.RaiseSingleEvent(e:GetHandler(),94585852,e,0,0,0,lv1) end if lv1>0 then Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+94585852,e,0,0,0,lv1) end
if lv2>0 then Duel.RaiseSingleEvent(e:GetHandler(),94585852,e,0,1,1,lv2) end if lv2>0 then Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CARD+94585852,e,0,1,1,lv2) end
end end
function c94585852.filter(c,lv) function c94585852.filter(c,lv)
return c:GetLevel()<lv and c:IsSetCard(0x45) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:GetLevel()<lv and c:IsSetCard(0x45) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
...@@ -551,6 +551,7 @@ EVENT_PHASE =0x1000 --阶段结束时 ...@@ -551,6 +551,7 @@ EVENT_PHASE =0x1000 --阶段结束时
EVENT_PHASE_START =0x2000 --阶段开始时 EVENT_PHASE_START =0x2000 --阶段开始时
EVENT_ADD_COUNTER =0x10000--增加指示物时 EVENT_ADD_COUNTER =0x10000--增加指示物时
EVENT_REMOVE_COUNTER =0x20000--去除指示物时 EVENT_REMOVE_COUNTER =0x20000--去除指示物时
EVENT_CARD =0x10000000
--Categorys 效果分类(表示这个效果将要发生什么事,OperationInfo设置了效果分类才能触发针对这一类型发动的卡,如破坏->星尘龙 --Categorys 效果分类(表示这个效果将要发生什么事,OperationInfo设置了效果分类才能触发针对这一类型发动的卡,如破坏->星尘龙
CATEGORY_DESTROY =0x1 --破坏效果 CATEGORY_DESTROY =0x1 --破坏效果
CATEGORY_RELEASE =0x2 --解放效果 CATEGORY_RELEASE =0x2 --解放效果
......
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