Commit ac044801 authored by Argon's avatar Argon

activity count

parent 64d68a90
......@@ -57,7 +57,7 @@ function c102380.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(p,d,REASON_EFFECT)
end
function c102380.spcost(e,c,tp)
return not Duel.CheckNormalSummonActivity(tp)
return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end
function c102380.spcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -11,7 +11,7 @@ function c1036974.initial_effect(c)
c:RegisterEffect(e1)
end
function c1036974.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
......
......@@ -19,7 +19,7 @@ function c11373345.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11373345.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c11373345.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
......
......@@ -18,7 +18,7 @@ function c12836042.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c12836042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1
and not Duel.CheckSpecialSummonActivity(tp)
and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0
and e:GetHandler():IsReleasable() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -28,7 +28,7 @@ function c21420702.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST)
end
function c21420702.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
......
......@@ -33,8 +33,9 @@ function c25920413.spfilter(c)
end
function c25920413.spcon(e,c)
if c==nil then return true end
return not Duel.CheckNormalSummonActivity(c:GetControler())
and Duel.IsExistingMatchingCard(c25920413.spfilter,c:GetControler(),0,LOCATION_MZONE,1,nil)
local tp=c:GetControler()
return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
and Duel.IsExistingMatchingCard(c25920413.spfilter,tp,0,LOCATION_MZONE,1,nil)
end
function c25920413.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
......
......@@ -19,7 +19,7 @@ function c33302407.initial_effect(c)
c:RegisterEffect(e2)
end
function c33302407.discon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and not Duel.CheckAttackActivity(tp)
return tp==Duel.GetTurnPlayer() and Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0
end
function c33302407.filter(c)
return c:IsFaceup() and c:IsSetCard(0x25)
......
......@@ -16,7 +16,7 @@ function c34838437.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c34838437.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckNormalSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -10,7 +10,7 @@ function c39980304.initial_effect(c)
c:RegisterEffect(e1)
end
function c39980304.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
......
......@@ -18,7 +18,7 @@ function c41613948.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPosition(POS_FACEUP_ATTACK)
end
function c41613948.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
......
......@@ -16,7 +16,7 @@ function c4168871.filter(c)
return c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c4168871.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0
and Duel.IsExistingMatchingCard(c4168871.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c4168871.filter,tp,LOCATION_HAND,0,1,1,nil)
......
......@@ -36,7 +36,7 @@ function c43378076.cfilter(c)
return c:IsType(TYPE_SPIRIT) and c:GetCode()~=43378076 and not c:IsPublic()
end
function c43378076.sretcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0
and Duel.IsExistingMatchingCard(c43378076.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c43378076.cfilter,tp,LOCATION_HAND,0,1,1,nil)
......
......@@ -16,7 +16,7 @@ function c44028461.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c44028461.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckNormalSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end
--oath effects
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -27,7 +27,7 @@ function c44887817.initial_effect(c)
c:RegisterEffect(e3)
end
function c44887817.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckNormalSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end
end
function c44887817.filter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -31,7 +31,7 @@ function c45812361.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(45812361)~=0 and Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c45812361.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) and e:GetHandler():IsReleasable() end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
--oath effects
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -66,7 +66,7 @@ function c45950291.thcon(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetDrawCount(tp)>0
end
function c45950291.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -12,8 +12,8 @@ function c46173679.initial_effect(c)
c:RegisterEffect(e1)
end
function c46173679.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp)
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -13,7 +13,7 @@ function c48049769.initial_effect(c)
c:RegisterEffect(e1)
end
function c48049769.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) and e:GetHandler():IsDiscardable() end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
--oath effects
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -11,7 +11,7 @@ function c52105192.initial_effect(c)
c:RegisterEffect(e1)
end
function c52105192.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckNormalSummonActivity(tp) and Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 and Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.DiscardDeck(tp,1,REASON_COST)
--oath effects
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -11,7 +11,7 @@ function c54283059.initial_effect(c)
c:RegisterEffect(e1)
end
function c54283059.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -11,7 +11,7 @@ function c54977057.initial_effect(c)
c:RegisterEffect(e1)
end
function c54977057.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) and Duel.GetCurrentPhase()~=PHASE_MAIN2 end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and Duel.GetCurrentPhase()~=PHASE_MAIN2 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -14,8 +14,8 @@ function c57274196.condition(e,tp,eg,ep,ev,re,r,rp)
return tc:IsControler(tp) and tc:IsRace(RACE_SPELLCASTER) and tc:IsChainAttackable()
end
function c57274196.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp)
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -16,7 +16,7 @@ function c59708927.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c59708927.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckNormalSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
......
......@@ -11,8 +11,8 @@ function c60764581.initial_effect(c)
c:RegisterEffect(e1)
end
function c60764581.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp)
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -78,7 +78,7 @@ function c63014935.phop(e,tp,eg,ep,ev,re,r,rp)
else Duel.Damage(tp,1000,REASON_EFFECT) end
end
function c63014935.spcost(e,c,tp)
return not Duel.CheckNormalSummonActivity(tp)
return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end
function c63014935.spcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -37,7 +37,7 @@ function c66947414.initial_effect(c)
c:RegisterEffect(e5)
end
function c66947414.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.CheckNormalSummonActivity(tp)
return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end
function c66947414.chkfilter(c,tp)
return c:IsSetCard(0x15) and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
......
......@@ -15,7 +15,7 @@ function c67300516.initial_effect(c)
c:RegisterEffect(e1)
end
function c67300516.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and not Duel.CheckNormalSummonActivity(tp)
return Duel.GetTurnPlayer()==tp and Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end
function c67300516.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -12,7 +12,7 @@ function c68815401.initial_effect(c)
c:RegisterEffect(e1)
end
function c68815401.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) and not Duel.CheckAttackActivity(tp) end
if chk==0 then return Duel.CheckLPCost(tp,500) and Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
Duel.PayLPCost(tp,500)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -18,7 +18,7 @@ function c69537999.initial_effect(c)
c:RegisterEffect(e2)
end
function c69537999.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
......
......@@ -12,7 +12,7 @@ function c70406920.initial_effect(c)
c:RegisterEffect(e1)
end
function c70406920.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -13,7 +13,7 @@ function c73199638.initial_effect(c)
c:RegisterEffect(e1)
end
function c73199638.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -12,8 +12,8 @@ function c73915051.initial_effect(c)
c:RegisterEffect(e1)
end
function c73915051.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp)
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -35,7 +35,7 @@ function c75732622.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SpecialSummonComplete()
end
function c75732622.spcost(e,c,tp)
return not Duel.CheckNormalSummonActivity(tp)
return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end
function c75732622.spcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -28,7 +28,7 @@ function c86889202.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
end
function c86889202.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0
and Duel.IsExistingMatchingCard(c86889202.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c86889202.cfilter,1,1,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -19,8 +19,8 @@ function c87614611.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c87614611.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c87614611.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp)
and not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -37,8 +37,8 @@ function c88513608.condition(e,tp,eg,ep,ev,re,r,rp)
return c88513608.check(tp)
end
function c88513608.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp)
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -37,7 +37,7 @@ function c90727556.condition(e,tp,eg,ep,ev,re,r,rp)
and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_SPELL+TYPE_TRAP)
end
function c90727556.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -13,8 +13,8 @@ function c93431518.initial_effect(c)
c:RegisterEffect(e1)
end
function c93431518.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp)
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -11,7 +11,7 @@ function c95026693.initial_effect(c)
c:RegisterEffect(e1)
end
function c95026693.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
......
......@@ -34,9 +34,9 @@ function c95291684.cfilter(c)
end
function c95291684.sprcon(e,c)
if c==nil then return true end
local p=c:GetControler()
return not Duel.CheckNormalSummonActivity(p) and Duel.GetFieldGroupCount(p,0,LOCATION_MZONE)>0
and Duel.GetLocationCount(p,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c95291684.cfilter,p,LOCATION_MZONE,0,1,nil)
local tp=c:GetControler()
return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c95291684.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c95291684.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
......
......@@ -12,7 +12,7 @@ function c96142517.initial_effect(c)
c:RegisterEffect(e1)
end
function c96142517.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -13,7 +13,7 @@ function c98645731.initial_effect(c)
c:RegisterEffect(e1)
end
function c98645731.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
--oath effects
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -20,7 +20,7 @@ function c99311109.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c99311109.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c99311109.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
......@@ -11,8 +11,8 @@ function c99789342.initial_effect(c)
c:RegisterEffect(e1)
end
function c99789342.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp)
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -663,3 +663,9 @@ DUEL_ENABLE_PRIORITY =0x08 --启动优先权
DUEL_PSEUDO_SHUFFLE =0x10 --不洗牌
DUEL_TAG_MODE =0x20 --双打
DUEL_SIMPLE_AI =0x40 --AI
--
ACTIVITY_SUMMON =1
ACTIVITY_NORMALSUMMON =2
ACTIVITY_FLIPSUMMON =3
ACTIVITY_SPSUMMON =4
ACTIVITY_ATTACK =5
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