Commit 7197a96d authored by DailyShana's avatar DailyShana

update handling of effect activated in deck

Fluorohydride/ygopro-core@c1f6937
parent 3238a59a
...@@ -13,7 +13,7 @@ function c10028593.initial_effect(c) ...@@ -13,7 +13,7 @@ function c10028593.initial_effect(c)
end end
function c10028593.spcon(e,tp,eg,ep,ev,re,r,rp) function c10028593.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) return c:IsPreviousPosition(POS_FACEUP)
end end
function c10028593.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c10028593.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -41,7 +41,7 @@ function c10698416.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function c10698416.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c10698416.spcon(e,tp,eg,ep,ev,re,r,rp) function c10698416.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK return c:IsPreviousPosition(POS_FACEUP)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c10698416.filter1(c,e,tp) function c10698416.filter1(c,e,tp)
......
...@@ -60,7 +60,7 @@ function c1278431.actcon(e) ...@@ -60,7 +60,7 @@ function c1278431.actcon(e)
end end
function c1278431.spcon(e,tp,eg,ep,ev,re,r,rp) function c1278431.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK return c:IsPreviousPosition(POS_FACEUP)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c1278431.spfilter(c,e,tp) function c1278431.spfilter(c,e,tp)
......
...@@ -63,7 +63,7 @@ end ...@@ -63,7 +63,7 @@ end
function c13629812.retcon(e,tp,eg,ep,ev,re,r,rp) function c13629812.retcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetFirstCardTarget() local tc=c:GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_REMOVED) and not c:IsLocation(LOCATION_DECK) then if tc and tc:IsLocation(LOCATION_REMOVED) then
e:SetLabelObject(tc) e:SetLabelObject(tc)
tc:CreateEffectRelation(e) tc:CreateEffectRelation(e)
return true return true
......
...@@ -38,7 +38,7 @@ function c15710054.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c15710054.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c15710054.spcon(e,tp,eg,ep,ev,re,r,rp) function c15710054.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK return c:IsPreviousPosition(POS_FACEUP)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c15710054.filter1(c,e,tp) function c15710054.filter1(c,e,tp)
......
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
function c19801646.thcon(e,tp,eg,ep,ev,re,r,rp) function c19801646.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT))) return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) and c:IsPreviousPosition(POS_FACEUP)
end end
function c19801646.thfilter(c) function c19801646.thfilter(c)
return c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() return c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand()
......
...@@ -6,7 +6,7 @@ function c20358953.initial_effect(c) ...@@ -6,7 +6,7 @@ function c20358953.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_LEAVE_FIELD) e1:SetCode(EVENT_DESTROYED)
e1:SetCondition(c20358953.spcon) e1:SetCondition(c20358953.spcon)
e1:SetTarget(c20358953.sptg) e1:SetTarget(c20358953.sptg)
e1:SetOperation(c20358953.spop) e1:SetOperation(c20358953.spop)
...@@ -14,8 +14,8 @@ function c20358953.initial_effect(c) ...@@ -14,8 +14,8 @@ function c20358953.initial_effect(c)
end end
function c20358953.spcon(e,tp,eg,ep,ev,re,r,rp) function c20358953.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) and not c:IsLocation(LOCATION_DECK) return c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) and c:GetReasonPlayer()==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end end
function c20358953.filter(c,e,tp) function c20358953.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -14,7 +14,7 @@ function c24419823.initial_effect(c) ...@@ -14,7 +14,7 @@ function c24419823.initial_effect(c)
end end
function c24419823.thcon(e,tp,eg,ep,ev,re,r,rp) function c24419823.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return not c:IsLocation(LOCATION_DECK) and c:IsPreviousPosition(POS_FACEUP) return c:IsPreviousPosition(POS_FACEUP)
end end
function c24419823.filter(c) function c24419823.filter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand() return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
......
...@@ -51,8 +51,7 @@ function c34471458.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,8 +51,7 @@ function c34471458.lvop(e,tp,eg,ep,ev,re,r,rp)
end end
function c34471458.spcon(e,tp,eg,ep,ev,re,r,rp) function c34471458.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and not c:IsLocation(LOCATION_DECK) return c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP)
and c:IsPreviousPosition(POS_FACEUP)
end end
function c34471458.spfilter(c,e,tp) function c34471458.spfilter(c,e,tp)
return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0x8,tp,false,false) return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0x8,tp,false,false)
......
...@@ -55,7 +55,7 @@ function c43583400.sumop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c43583400.sumop(e,tp,eg,ep,ev,re,r,rp)
end end
function c43583400.drcon(e,tp,eg,ep,ev,re,r,rp) function c43583400.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) and c:GetPreviousControler()==tp return rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp
end end
function c43583400.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c43583400.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -44,7 +44,7 @@ end ...@@ -44,7 +44,7 @@ end
function c4404099.atkcon(e,tp,eg,ep,ev,re,r,rp) function c4404099.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabelObject():GetLabel() local ct=e:GetLabelObject():GetLabel()
e:SetLabel(ct) e:SetLabel(ct)
return ct>0 and not e:GetHandler():IsLocation(LOCATION_DECK) return ct>0
end end
function c4404099.filter(c) function c4404099.filter(c)
return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT) return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT)
......
...@@ -39,7 +39,7 @@ function c46083111.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c46083111.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
function c46083111.spcon(e,tp,eg,ep,ev,re,r,rp) function c46083111.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK return c:IsPreviousPosition(POS_FACEUP)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c46083111.filter1(c,e,tp) function c46083111.filter1(c,e,tp)
......
...@@ -42,7 +42,7 @@ function c47126872.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function c47126872.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
function c47126872.setcon(e,tp,eg,ep,ev,re,r,rp) function c47126872.setcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject():GetLabelObject() local tc=e:GetLabelObject():GetLabelObject()
return tc and tc:GetFlagEffect(47126872)~=0 and not e:GetHandler():IsLocation(LOCATION_DECK) return tc and tc:GetFlagEffect(47126872)~=0
end end
function c47126872.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c47126872.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -81,7 +81,7 @@ function c4779091.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,7 @@ function c4779091.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c4779091.spcon(e,tp,eg,ep,ev,re,r,rp) function c4779091.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK return c:IsPreviousPosition(POS_FACEUP)
end end
function c4779091.filter(c,e,tp) function c4779091.filter(c,e,tp)
return c:IsCode(31764700) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) return c:IsCode(31764700) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
......
...@@ -122,7 +122,7 @@ function c48680970.efilter(e,re) ...@@ -122,7 +122,7 @@ function c48680970.efilter(e,re)
end end
function c48680970.descon(e,tp,eg,ep,ev,re,r,rp) function c48680970.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) return c:IsPreviousPosition(POS_FACEUP)
end end
function c48680970.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c48680970.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -48,7 +48,7 @@ function c51205763.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function c51205763.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c51205763.spcon(e,tp,eg,ep,ev,re,r,rp) function c51205763.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK return c:IsPreviousPosition(POS_FACEUP)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c51205763.filter1(c,e,tp) function c51205763.filter1(c,e,tp)
......
...@@ -88,7 +88,7 @@ function c56562619.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,7 +88,7 @@ function c56562619.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
function c56562619.spcon(e,tp,eg,ep,ev,re,r,rp) function c56562619.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) return c:IsPreviousPosition(POS_FACEUP)
end end
function c56562619.spfilter(c,e,tp) function c56562619.spfilter(c,e,tp)
return c:GetFlagEffect(56562619)~=0 return c:GetFlagEffect(56562619)~=0
......
...@@ -61,7 +61,7 @@ function c57288708.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,7 @@ function c57288708.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
function c57288708.spcon(e,tp,eg,ep,ev,re,r,rp) function c57288708.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and not c:IsSummonType(SUMMON_TYPE_SPECIAL) and not c:IsLocation(LOCATION_DECK) return c:IsPreviousPosition(POS_FACEUP) and not c:IsSummonType(SUMMON_TYPE_SPECIAL)
end end
function c57288708.spfilter(c,e,tp) function c57288708.spfilter(c,e,tp)
return c:IsSetCard(0xfd) and not c:IsCode(57288708) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xfd) and not c:IsCode(57288708) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -100,7 +100,7 @@ function c59255742.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,7 +100,7 @@ function c59255742.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c59255742.ctcon(e,tp,eg,ep,ev,re,r,rp) function c59255742.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK return c:IsPreviousPosition(POS_FACEUP)
end end
function c59255742.ctfilter(c) function c59255742.ctfilter(c)
return c:GetControler()~=c:GetOwner() return c:GetControler()~=c:GetOwner()
......
...@@ -37,7 +37,7 @@ function c68989981.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,7 @@ function c68989981.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
function c68989981.spcon(e,tp,eg,ep,ev,re,r,rp) function c68989981.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) and c:GetPreviousControler()==tp return rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp
end end
function c68989981.spfilter(c,e,tp) function c68989981.spfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsLevelBelow(4) and not c:IsCode(68989981) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_ZOMBIE) and c:IsLevelBelow(4) and not c:IsCode(68989981) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -50,7 +50,7 @@ function c69105797.atkfilter(e,c) ...@@ -50,7 +50,7 @@ function c69105797.atkfilter(e,c)
end end
function c69105797.ccon(e,tp,eg,ep,ev,re,r,rp) function c69105797.ccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) return c:IsPreviousPosition(POS_FACEUP)
end end
function c69105797.cfilter(c) function c69105797.cfilter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL)
......
...@@ -12,15 +12,10 @@ function c70630741.initial_effect(c) ...@@ -12,15 +12,10 @@ function c70630741.initial_effect(c)
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_BATTLE_DESTROYED) e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetCondition(c70630741.condition)
e2:SetTarget(c70630741.target) e2:SetTarget(c70630741.target)
e2:SetOperation(c70630741.operation) e2:SetOperation(c70630741.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c70630741.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsLocation(LOCATION_DECK) and c:IsReason(REASON_BATTLE)
end
function c70630741.filter(c,tp) function c70630741.filter(c,tp)
return c:IsFaceup() and c:GetOwner()==tp and c:IsControlerCanBeChanged() return c:IsFaceup() and c:GetOwner()==tp and c:IsControlerCanBeChanged()
end end
......
...@@ -5,7 +5,6 @@ function c71829750.initial_effect(c) ...@@ -5,7 +5,6 @@ function c71829750.initial_effect(c)
e1:SetDescription(aux.Stringid(71829750,0)) e1:SetDescription(aux.Stringid(71829750,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(0,EFFECT_FLAG2_NAGA)
e1:SetCode(EVENT_TO_DECK) e1:SetCode(EVENT_TO_DECK)
e1:SetCondition(c71829750.spcon) e1:SetCondition(c71829750.spcon)
e1:SetTarget(c71829750.sptg) e1:SetTarget(c71829750.sptg)
......
...@@ -6,14 +6,10 @@ function c73702909.initial_effect(c) ...@@ -6,14 +6,10 @@ function c73702909.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c73702909.condition)
e1:SetTarget(c73702909.target) e1:SetTarget(c73702909.target)
e1:SetOperation(c73702909.operation) e1:SetOperation(c73702909.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c73702909.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsLocation(LOCATION_DECK)
end
function c73702909.spfilter(c,e,tp) function c73702909.spfilter(c,e,tp)
return c:IsLevelBelow(2) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) return c:IsLevelBelow(2) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
......
...@@ -91,7 +91,7 @@ function c73734821.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,7 +91,7 @@ function c73734821.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c73734821.descon(e,tp,eg,ep,ev,re,r,rp) function c73734821.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and not e:GetHandler():IsLocation(LOCATION_DECK) return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end end
function c73734821.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c73734821.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
......
...@@ -20,7 +20,7 @@ function c77841719.initial_effect(c) ...@@ -20,7 +20,7 @@ function c77841719.initial_effect(c)
end end
function c77841719.condition(e,tp,eg,ep,ev,re,r,rp) function c77841719.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) return c:IsPreviousPosition(POS_FACEUP)
and c:GetPreviousControler()==tp and rp==1-tp and c:GetPreviousControler()==tp and rp==1-tp
end end
function c77841719.filter(c) function c77841719.filter(c)
......
...@@ -65,7 +65,7 @@ function c78371393.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function c78371393.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
function c78371393.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c78371393.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsLocation(LOCATION_DECK) end if chk==0 then return true end
if not Duel.CheckReleaseGroup(tp,nil,1,nil) then if not Duel.CheckReleaseGroup(tp,nil,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end end
......
...@@ -14,7 +14,7 @@ function c80794697.initial_effect(c) ...@@ -14,7 +14,7 @@ function c80794697.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c80794697.condition(e,tp,eg,ep,ev,re,r,rp) function c80794697.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and not e:GetHandler():IsLocation(LOCATION_DECK) return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end end
function c80794697.tgfilter(c) function c80794697.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_CYBERSE) and c:IsDiscardable() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_CYBERSE) and c:IsDiscardable()
......
...@@ -40,7 +40,7 @@ function c83293307.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,7 @@ function c83293307.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c83293307.spcon(e,tp,eg,ep,ev,re,r,rp) function c83293307.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK return c:IsPreviousPosition(POS_FACEUP)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c83293307.filter1(c,e,tp) function c83293307.filter1(c,e,tp)
......
...@@ -12,18 +12,13 @@ function c87997872.initial_effect(c) ...@@ -12,18 +12,13 @@ function c87997872.initial_effect(c)
e2:SetDescription(aux.Stringid(87997872,0)) e2:SetDescription(aux.Stringid(87997872,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c87997872.spcon) e2:SetCondition(c87997872.spcon)
e2:SetCost(c87997872.cost) e2:SetCost(c87997872.cost)
e2:SetTarget(c87997872.sptg) e2:SetTarget(c87997872.sptg)
e2:SetOperation(c87997872.spop) e2:SetOperation(c87997872.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetRange(LOCATION_DECK)
e3:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE,EFFECT_FLAG2_NAGA)
c:RegisterEffect(e3)
--atkup --atkup
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(87997872,1)) e4:SetDescription(aux.Stringid(87997872,1))
......
...@@ -38,7 +38,7 @@ function c88316955.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c88316955.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c88316955.spcon(e,tp,eg,ep,ev,re,r,rp) function c88316955.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK return c:IsPreviousPosition(POS_FACEUP)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c88316955.filter1(c,e,tp) function c88316955.filter1(c,e,tp)
......
...@@ -24,7 +24,7 @@ function c9047460.initial_effect(c) ...@@ -24,7 +24,7 @@ function c9047460.initial_effect(c)
end end
function c9047460.tkcon(e,tp,eg,ep,ev,re,r,rp) function c9047460.tkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK return c:IsPreviousPosition(POS_FACEUP)
end end
function c9047460.tktg(e,tp,eg,ep,ev,re,r,rp,chk) function c9047460.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -22,7 +22,6 @@ function c9156135.initial_effect(c) ...@@ -22,7 +22,6 @@ function c9156135.initial_effect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYED) e4:SetCode(EVENT_BATTLE_DESTROYED)
e4:SetCondition(c9156135.condition)
e4:SetTarget(c9156135.target) e4:SetTarget(c9156135.target)
e4:SetOperation(c9156135.operation) e4:SetOperation(c9156135.operation)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -43,9 +42,6 @@ function c9156135.addc(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,9 +42,6 @@ function c9156135.addc(e,tp,eg,ep,ev,re,r,rp)
tc:AddCounter(0x1,1) tc:AddCounter(0x1,1)
end end
end end
function c9156135.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsLocation(LOCATION_DECK) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c9156135.spfilter(c,e,tp) function c9156135.spfilter(c,e,tp)
return c:IsLevelBelow(2) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) return c:IsLevelBelow(2) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
......
...@@ -6,18 +6,13 @@ function c92377303.initial_effect(c) ...@@ -6,18 +6,13 @@ function c92377303.initial_effect(c)
e1:SetDescription(aux.Stringid(92377303,0)) e1:SetDescription(aux.Stringid(92377303,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:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCode(EVENT_CUSTOM+71625222) e1:SetCode(EVENT_CUSTOM+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)
e1:SetOperation(c92377303.spop) e1:SetOperation(c92377303.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetRange(LOCATION_DECK)
e2:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE,EFFECT_FLAG2_NAGA)
c:RegisterEffect(e2)
--to hand --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(92377303,1)) e3:SetDescription(aux.Stringid(92377303,1))
......
...@@ -37,8 +37,7 @@ function c94982447.initial_effect(c) ...@@ -37,8 +37,7 @@ function c94982447.initial_effect(c)
end end
function c94982447.spcon(e,tp,eg,ep,ev,re,r,rp) function c94982447.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) return c:IsPreviousPosition(POS_FACEUP) and c:IsSummonType(SUMMON_TYPE_ADVANCE)
and c:IsSummonType(SUMMON_TYPE_ADVANCE) and not c:IsLocation(LOCATION_DECK)
end end
function c94982447.spfilter(c,e,tp) function c94982447.spfilter(c,e,tp)
return c:IsSetCard(0xf9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsSetCard(0xf9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -69,7 +69,7 @@ end ...@@ -69,7 +69,7 @@ end
function c97617181.atkcon(e,tp,eg,ep,ev,re,r,rp) function c97617181.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetFirstCardTarget() local tc=c:GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and not c:IsLocation(LOCATION_DECK) then if tc and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
e:SetLabelObject(tc) e:SetLabelObject(tc)
tc:CreateEffectRelation(e) tc:CreateEffectRelation(e)
return true return true
......
...@@ -43,8 +43,7 @@ function c98301564.cfilter(c) ...@@ -43,8 +43,7 @@ function c98301564.cfilter(c)
return c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER) and c:IsAbleToHand() return c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER) and c:IsAbleToHand()
end end
function c98301564.regtg(e,tp,eg,ep,ev,re,r,rp,chk) function c98301564.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsLocation(LOCATION_DECK) if chk==0 then return Duel.IsExistingMatchingCard(c98301564.cfilter,tp,LOCATION_DECK,0,3,nil) end
and Duel.IsExistingMatchingCard(c98301564.cfilter,tp,LOCATION_DECK,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
function c98301564.regop(e,tp,eg,ep,ev,re,r,rp) function c98301564.regop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -288,7 +288,7 @@ EFFECT_FLAG_COF =0x20000000 --N/A ...@@ -288,7 +288,7 @@ EFFECT_FLAG_COF =0x20000000 --N/A
EFFECT_FLAG_CVAL_CHECK =0x40000000 --N/A EFFECT_FLAG_CVAL_CHECK =0x40000000 --N/A
EFFECT_FLAG_IMMEDIATELY_APPLY =0x80000000 --卡在发动时效果就立即适用(卡通王國) EFFECT_FLAG_IMMEDIATELY_APPLY =0x80000000 --卡在发动时效果就立即适用(卡通王國)
EFFECT_FLAG2_NAGA =0x0001 --特殊情况时发动不会被无效(神卡纳迦的特殊处理) EFFECT_FLAG2_NAGA =0x0001 --N/A
EFFECT_FLAG2_COF =0x0002 --通常魔法卡在MP1以外发动(邪恶的仪式的特殊处理) EFFECT_FLAG2_COF =0x0002 --通常魔法卡在MP1以外发动(邪恶的仪式的特殊处理)
--========== Codes ========== --对永续性效果表示效果类型(EFFECT开头),对诱发型效果表示触发效果的事件/时点(EVENT开头) --========== Codes ========== --对永续性效果表示效果类型(EFFECT开头),对诱发型效果表示触发效果的事件/时点(EVENT开头)
EFFECT_IMMUNE_EFFECT =1 --效果免疫 EFFECT_IMMUNE_EFFECT =1 --效果免疫
......
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