Commit b7babc47 authored by 未闻皂名's avatar 未闻皂名

2021/9/18 合并战斗·效果破坏的效果,新增鞋子附赠卡

parent 5980b0b6
No preview for this file type
...@@ -16,7 +16,7 @@ end ...@@ -16,7 +16,7 @@ end
--Activate --Activate
function cm.confilter(c,tp) function cm.confilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
and bit.band(c:GetPreviousTypeOnField(),TYPE_SPELL)~=0 and bit.band(c:GetPreviousTypeOnField(),TYPE_SPELL)~=0 and c:IsReason(REASON_EFFECT)
end end
function cm.desfilter(c) function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
......
...@@ -16,7 +16,7 @@ end ...@@ -16,7 +16,7 @@ end
--Activate --Activate
function cm.confilter(c,tp) function cm.confilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) return c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE)
and bit.band(c:GetPreviousTypeOnField(),TYPE_NORMAL)~=0 and bit.band(c:GetPreviousTypeOnField(),TYPE_NORMAL)~=0 and c:IsReason(REASON_EFFECT)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -6,32 +6,23 @@ function cm.initial_effect(c) ...@@ -6,32 +6,23 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition1) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(cm.condition2)
c:RegisterEffect(e2)
end end
--Activate --Activate
function cm.confilter1(c,tp) function cm.confilter(c,tp)
return c:GetPreviousControler()==tp and c==Duel.GetAttackTarget()
end
function cm.confilter2(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and (c:IsReason(REASON_EFFECT) or c==Duel.GetAttackTarget())
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLevel(1) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(1) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter1,1,nil,tp) return rp==1-tp and eg:IsExists(cm.confilter,1,nil,tp)
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and eg:IsExists(cm.confilter2,1,nil,tp)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
......
...@@ -16,7 +16,7 @@ end ...@@ -16,7 +16,7 @@ end
--Activate --Activate
function cm.confilter(c,tp) function cm.confilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
and bit.band(c:GetPreviousTypeOnField(),TYPE_TRAP)~=0 and bit.band(c:GetPreviousTypeOnField(),TYPE_TRAP)~=0 and c:IsReason(REASON_EFFECT)
end end
function cm.desfilter(c) function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
......
...@@ -8,34 +8,24 @@ function cm.initial_effect(c) ...@@ -8,34 +8,24 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition1) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(cm.condition2)
c:RegisterEffect(e2)
end end
--Activate --Activate
function cm.confilter1(c,tp) function cm.confilter(c,tp)
return c:GetPreviousPosition()==POS_FACEUP_ATTACK and c:GetPreviousControler()==tp return c:IsPreviousPosition(POS_ATTACK)
and c==Duel.GetAttackTarget() and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
end and (c:IsReason(REASON_EFFECT) or c==Duel.GetAttackTarget())
function cm.confilter2(c,tp)
return c:GetPreviousPosition()==POS_FACEUP_ATTACK and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_MZONE)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCode(list[1],list[2]) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(list[1],list[2]) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter1,1,nil,tp) return rp==1-tp and eg:IsExists(cm.confilter,1,nil,tp)
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and eg:IsExists(cm.confilter2,1,nil,tp)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
......
...@@ -16,7 +16,7 @@ end ...@@ -16,7 +16,7 @@ end
--Activate --Activate
function cm.confilter(c,tp) function cm.confilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
and bit.band(c:GetPreviousTypeOnField(),TYPE_SPELL+TYPE_TRAP)~=0 and bit.band(c:GetPreviousTypeOnField(),TYPE_SPELL+TYPE_TRAP)~=0 and c:IsReason(REASON_EFFECT)
end end
function cm.desfilter(c) function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsLevelBelow(6) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsLevelBelow(6)
......
...@@ -8,25 +8,18 @@ function cm.initial_effect(c) ...@@ -8,25 +8,18 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_RECOVER) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition1) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(cm.condition2)
c:RegisterEffect(e2)
end end
--Activate --Activate
function cm.confilter1(c,tp) function cm.confilter(c,tp,re)
return c:GetPreviousControler()==tp and c==Duel.GetAttackTarget() return c:IsPreviousPosition(POS_ATTACK) and bit.band(c:GetPreviousRaceOnField(),RACE_PYRO)~=0
and c:IsPreviousPosition(POS_ATTACK) and bit.band(c:GetPreviousRaceOnField(),RACE_PYRO)~=0 and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
end and ((c:IsReason(REASON_EFFECT) and re:IsActiveType(TYPE_TRAP)) or c==Duel.GetAttackTarget())
function cm.confilter2(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_ATTACK) and bit.band(c:GetPreviousRaceOnField(),RACE_PYRO)~=0
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCode(list[1],list[2]) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(list[1],list[2]) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -34,11 +27,8 @@ end ...@@ -34,11 +27,8 @@ end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_PYRO) return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_PYRO)
end end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter1,1,nil,tp) return rp==1-tp and eg:IsExists(cm.confilter,1,nil,tp,re)
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_TRAP) and eg:IsExists(cm.confilter2,1,nil,tp)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
......
...@@ -8,36 +8,25 @@ function cm.initial_effect(c) ...@@ -8,36 +8,25 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition1) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(cm.condition2)
c:RegisterEffect(e2)
end end
--Activate --Activate
function cm.confilter1(c,tp) function cm.confilter(c,tp,re)
return c:GetPreviousControler()==tp and c==Duel.GetAttackTarget() return c:IsPreviousPosition(POS_ATTACK) and c:GetPreviousLevelOnField()>=7
and c:IsPreviousPosition(POS_ATTACK) and c:GetPreviousLevelOnField()>=7
and bit.band(c:GetPreviousRaceOnField(),RACE_WARRIOR)~=0
end
function cm.confilter2(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_ATTACK) and c:GetPreviousLevelOnField()>=7
and bit.band(c:GetPreviousRaceOnField(),RACE_WARRIOR)~=0 and bit.band(c:GetPreviousRaceOnField(),RACE_WARRIOR)~=0
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and ((c:IsReason(REASON_EFFECT) and re:IsActiveType(TYPE_TRAP)) or c==Duel.GetAttackTarget())
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCode(list[1],list[2],list[3]) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsCode(list[1],list[2],list[3]) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter1,1,nil,tp) return rp==1-tp and eg:IsExists(cm.confilter,1,nil,tp,re)
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_TRAP) and eg:IsExists(cm.confilter2,1,nil,tp)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
......
...@@ -18,6 +18,7 @@ end ...@@ -18,6 +18,7 @@ end
--Activate --Activate
function cm.confilter(c,tp) function cm.confilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsReason(REASON_EFFECT)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......
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