Commit f29ee6f6 authored by xiaoye's avatar xiaoye

merged Card.functions

parent 239cbc7e

Too many changes to show.

To preserve performance only 1428 of 1428+ files are displayed.

......@@ -8,7 +8,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_MONSTER,e,tp,Card.IsFaceup,tp,LOCATION_CIRCLE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if vgf.filter.IsR(tc) then
if tc:IsRearguard() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......@@ -18,7 +18,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1)
tc:RegisterEffect(e1)
vgf.effect.Reset(c,e1,EVENT_BATTLED)
elseif vgf.filter.IsV(tc) then
elseif tc:IsVanguard() then
tc:RegisterFlagEffect(FLAG_SENTINEL,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
......
......@@ -18,5 +18,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.con.IsR(e) and c:GetFlagEffectLabel(FLAG_CONDITION)==201 and vgf.filter.IsV(Duel.GetAttackTarget())
end
\ No newline at end of file
return vgf.con.IsR(e) and c:GetFlagEffectLabel(FLAG_CONDITION)==201 and Duel.GetAttackTarget():IsVanguard()end
\ No newline at end of file
......@@ -14,7 +14,7 @@ function cm.checkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget() and Duel.GetAttacker() and eg:IsExists(cm.checkfilter,1,nil,Duel.GetAttacker():GetControler())
end
function cm.filter(c)
return vgf.filter.IsR(c) and c:IsDefensePos()
return c:IsRearguard() and c:IsDefensePos()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -29,5 +29,4 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.filter(c)
return c:IsLevel(3) and vgf.filter.IsV(c)
end
\ No newline at end of file
return c:IsLevel(3) and c:IsVanguard()end
\ No newline at end of file
......@@ -9,8 +9,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
vgf.AtkUp(c,g,10000,nil)
end
function cm.filter(c)
return c:IsLevel(3) and vgf.filter.IsR(c)
end
return c:IsLevel(3) and c:IsRearguard()end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsRelateToEffect(e) end
......
......@@ -27,5 +27,4 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Card.IsSequence(c,1,2,3) and vgf.filter.IsV(Duel.GetAttackTarget())
end
\ No newline at end of file
return Card.IsSequence(c,1,2,3) and Duel.GetAttackTarget():IsVanguard()end
\ No newline at end of file
......@@ -12,7 +12,7 @@ end
function cm.con(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return vgf.filter.IsR(c) and vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,1,nil)
return c:IsRearguard() and vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,1,nil)
end
function cm.filter(c)
return c:GetFlagEffect(FLAG_IMPRISON)>0
......
......@@ -4,7 +4,7 @@ function cm.initial_effect(c)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.filter.IsR(c) and Card.IsSequence(Duel.GetAttackTarget(),5)
return c:IsRearguard() and Card.IsSequence(Duel.GetAttackTarget(),5)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -4,7 +4,7 @@ function cm.initial_effect(c)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.filter.IsR(c) and vgf.CheckPrison(tp)
return c:IsRearguard() and vgf.CheckPrison(tp)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -24,5 +24,4 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(g,EVENT_CUSTOM+EVENT_SUPPORT,e,0,tp,tp,0)
end
function cm.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSkill(SKILL_BOOST) and vgf.filter.IsR(c)
end
\ No newline at end of file
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSkill(SKILL_BOOST) and c:IsRearguard()end
\ No newline at end of file
......@@ -32,8 +32,7 @@ function cm.con(e,c)
return Duel.GetFlagEffect(tp,m)>0
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return vgf.filter.IsV(e:GetHandler()) and vgf.filter.IsV(Duel.GetAttackTarget())
end
return e:GetHandler():IsVanguard() and Duel.GetAttackTarget():IsVanguard()end
function cm.check(g)
return g:GetClassCount(Card.GetLevel)==#g
end
......@@ -60,5 +59,5 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.filter(c)
return vgf.filter.IsV(c) and c:IsLevelAbove(3)
return c:IsVanguard() and c:IsLevelAbove(3)
end
\ No newline at end of file
......@@ -7,8 +7,7 @@ function cm.initial_effect(c)
vgd.action.AbilityAutoRided(c,m,cm.filter,cm.operation)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return vgf.filter.IsV(Duel.GetAttackTarget())
end
return Duel.GetAttackTarget():IsVanguard()end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
vgf.op.SoulCharge(1)(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -30,7 +30,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return vgf.filter.IsR(e:GetHandler()) and Duel.GetAttacker()==e:GetHandler()
return e:GetHandler():IsRearguard() and Duel.GetAttacker()==e:GetHandler()
end
function cm.condition3(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler()
......
......@@ -20,7 +20,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return vgf.filter.IsR(e:GetHandler()) and vgf.GetVMonster(tp):IsSetCard(0xe8)
return e:GetHandler():IsRearguard() and vgf.GetVMonster(tp):IsSetCard(0xe8)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
vgf.Sendto(LOCATION_SOUL,e:GetHandler(),vgf.GetVMonster(tp))
......
......@@ -5,7 +5,7 @@ function cm.initial_effect(c)
vgd.action.AbilityAct(c,m,LOCATION_CIRCLE,cm.operation,vgf.cost.CounterBlast(2),cm.condition,nil,1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return vgf.filter.IsR(e:GetHandler()) and vgf.GetVMonster(tp):IsLevelAbove(3)
return e:GetHandler():IsRearguard() and vgf.GetVMonster(tp):IsLevelAbove(3)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
......
......@@ -5,8 +5,7 @@ function cm.initial_effect(c)
vgd.action.AbilityAuto(c,m,LOCATION_CIRCLE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.operation,vgf.cost.SoulBlast(1),cm.condition)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return vgf.GetVMonster(tp):IsSetCard(0xe8) and vgf.filter.IsR(e:GetHandler())
end
return vgf.GetVMonster(tp):IsSetCard(0xe8) and e:GetHandler():IsRearguard()end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_XMATERIAL,e,tp,nil,tp,LOCATION_DROP,0,1,1,nil)
......
......@@ -5,8 +5,7 @@ function cm.initial_effect(c)
vgd.action.AbilityAuto(c,m,LOCATION_CIRCLE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.operation,nil,cm.condition)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return vgf.filter.IsR(e:GetHandler())
end
return e:GetHandler():IsRearguard()end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,2)
Duel.ConfirmCards(tp,g)
......
......@@ -28,7 +28,7 @@ function cm.filter(c,e,tp)
return c:IsSetCard(0x76) and vgf.IsCanBeCalled(c,e,tp)
end
function cm.checkfilter(c)
return vgf.filter.RideOnVCircle(c) and c:IsLevelAbove(3)
return c:IsRideOnVCircle() and c:IsLevelAbove(3)
end
function cm.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.checkfilter,1,nil)
......
......@@ -20,5 +20,5 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cfilter(c,mc)
return Card.GetColumnGroup(c):IsContains(mc) and c:IsControler(mc:GetControler()) and c:GetFlagEffect(FLAG_SUPPORT)>0
return c):IsContains(mc:GetColumnGroup() and c:IsControler(mc:GetControler()) and c:GetFlagEffect(FLAG_SUPPORT)>0
end
\ No newline at end of file
......@@ -10,7 +10,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.filter.IsR(c) and vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_CIRCLE,0,1,nil)
return c:IsRearguard() and vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_CIRCLE,0,1,nil)
end
function cm.filter(c)
return vgf.filter.IsV and c:IsSetCard(0x77)
......
......@@ -4,10 +4,10 @@ function cm.initial_effect(c)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.filter.IsR(c) and eg:IsExists(cm.filter,1,nil,tp)
return c:IsRearguard() and eg:IsExists(cm.filter,1,nil,tp)
end
function cm.filter(c,tp)
return c:IsSummonType(SUMMON_VALUE_REVOLT) and vgf.filter.IsV(c) and c:IsControler(tp)
return c:IsSummonType(SUMMON_VALUE_REVOLT) and c:IsVanguard() and c:IsControler(tp)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -4,7 +4,7 @@ function cm.initial_effect(c)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.filter.IsR(c) and vgf.filter.IsV(Duel.GetAttackTarget()) and vgf.IsExistingMatchingCard(nil,tp,LOCATION_CIRCLE+LOCATION_DROP,0,4,nil)
return c:IsRearguard() and Duel.GetAttackTarget():IsVanguard() and vgf.IsExistingMatchingCard(nil,tp,LOCATION_CIRCLE+LOCATION_DROP,0,4,nil)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,3)
......
......@@ -13,8 +13,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
vgf.Sendto(LOCATION_HAND,g,nil,REASON_EFFECT)
end
function cm.filter(c)
return vgf.filter.IsR(c)
end
return c:IsRearguard()end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0 and vgf.con.IsV(e) and Duel.GetAttacker()==e:GetHandler()
end
......
......@@ -9,11 +9,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
vgf.Sendto(LOCATION_HAND,g,nil,REASON_EFFECT)
end
function cm.filter(c)
return vgf.filter.IsR(c)
end
return c:IsRearguard()end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_CIRCLE,0,1,nil,e:GetHandler()) and Duel.GetAttacker()==e:GetHandler() and vgf.con.IsR(e)
end
function cm.cfilter(c,mc)
return Card.GetColumnGroup(c):IsContains(mc) and c:IsControler(mc:GetControler()) and c:GetFlagEffect(FLAG_SUPPORT)>0
return c):IsContains(mc:GetColumnGroup() and c:IsControler(mc:GetControler()) and c:GetFlagEffect(FLAG_SUPPORT)>0
end
\ No newline at end of file
......@@ -9,5 +9,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
vgd.action.AbilityCont(c, m, LOCATION_CIRCLE, EFFECT_TYPE_FIELD, EFFECT_UPDATE_ATTACK, 5000, nil, cm.tg, LOCATION_CIRCLE, 0, RESET_PHASE+PHASE_END, g:GetFirst()
end
function cm.tg(e,c)
return vgf.filter.IsR(c)
end
\ No newline at end of file
return c:IsRearguard()end
\ No newline at end of file
......@@ -10,8 +10,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ChangePosition(g,POS_FACEUP_DEFENCE)
end
function cm.filter(c)
return c:IsCanChangePosition() and c:IsPosition(POS_FACEUP_ATTACK) and vgf.filter.IsR(c)
end
return c:IsCanChangePosition() and c:IsPosition(POS_FACEUP_ATTACK) and c:IsRearguard()end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_LEAVEFIELD,e,tp,vgf.filter.IsV,tp,0,LOCATION_CIRCLE,1,1,nil)
......
......@@ -18,5 +18,4 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.filter1(c)
return vgf.filter.IsR(c) and vgf.filter.Front(c)
end
\ No newline at end of file
return c:IsRearguard() and c:IsFrontrow()end
\ No newline at end of file
......@@ -4,8 +4,7 @@ function cm.initial_effect(c)
end
function cm.con(e)
local c=e:GetHandler()
return vgf.filter.Back(c)
end
return c:IsBackrow()end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_ATKUP,e,tp,vgf.filter.IsR,tp,LOCATION_CIRCLE,0,1,1,c)
......
......@@ -17,5 +17,4 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
end
function cm.tg(e,c)
return vgf.filter.IsV(c)
end
\ No newline at end of file
return c:IsVanguard()end
\ No newline at end of file
......@@ -19,5 +19,5 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.filter(c)
return vgf.filter.IsR(c) and c:GetFlagEffect(FLAG_ALSO_CAN_TRIGGER)==0 and c:IsFaceup()
return c:IsRearguard() and c:GetFlagEffect(FLAG_ALSO_CAN_TRIGGER)==0 and c:IsFaceup()
end
\ No newline at end of file
......@@ -7,8 +7,7 @@ function cm.initial_effect(c)
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttacker()
return vgf.con.IsR(e) and vgf.GetMatchingGroupCount(vgf.filter.IsR,tp,0,LOCATION_CIRCLE,nil)<=2 and vgf.filter.IsV(c)
end
return vgf.con.IsR(e) and vgf.GetMatchingGroupCount(vgf.filter.IsR,tp,0,LOCATION_CIRCLE,nil)<=2 and c:IsVanguard()end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsRelateToEffect(e) end
......
......@@ -19,5 +19,5 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.filter(c)
return vgf.filter.IsR(c) and c:IsLevelAbove(2)
return c:IsRearguard() and c:IsLevelAbove(2)
end
\ No newline at end of file
......@@ -8,7 +8,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_MONSTER,e,tp,nil,tp,LOCATION_CIRCLE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if vgf.filter.IsR(tc) then
if tc:IsRearguard() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......@@ -18,7 +18,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1)
tc:RegisterEffect(e1)
vgf.effect.Reset(c,e1,EVENT_BATTLED)
elseif vgf.filter.IsV(tc) then
elseif tc:IsVanguard() then
tc:RegisterFlagEffect(FLAG_SENTINEL,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
......
......@@ -7,7 +7,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_MONSTER,e,tp,Card.IsFaceup,tp,LOCATION_CIRCLE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if vgf.filter.IsR(tc) then
if tc:IsRearguard() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......@@ -17,7 +17,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1)
tc:RegisterEffect(e1)
vgf.effect.Reset(c,e1,EVENT_BATTLED)
elseif vgf.filter.IsV(tc) then
elseif tc:IsVanguard() then
tc:RegisterFlagEffect(FLAG_SENTINEL,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
......
......@@ -8,7 +8,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_MONSTER,e,tp,nil,tp,LOCATION_CIRCLE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if vgf.filter.IsR(tc) then
if tc:IsRearguard() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......@@ -18,7 +18,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1)
tc:RegisterEffect(e1)
vgf.effect.Reset(c,e1,EVENT_BATTLED)
elseif vgf.filter.IsV(tc) then
elseif tc:IsVanguard() then
tc:RegisterFlagEffect(FLAG_SENTINEL,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
......
......@@ -8,7 +8,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_MONSTER,e,tp,nil,tp,LOCATION_CIRCLE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if vgf.filter.IsR(tc) then
if tc:IsRearguard() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......@@ -18,7 +18,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1)
tc:RegisterEffect(e1)
vgf.effect.Reset(c,e1,EVENT_BATTLED)
elseif vgf.filter.IsV(tc) then
elseif tc:IsVanguard() then
tc:RegisterFlagEffect(FLAG_SENTINEL,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
......
......@@ -8,7 +8,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_MONSTER,e,tp,nil,tp,LOCATION_CIRCLE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if vgf.filter.IsR(tc) then
if tc:IsRearguard() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......@@ -18,7 +18,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1)
tc:RegisterEffect(e1)
vgf.effect.Reset(c,e1,EVENT_BATTLED)
elseif vgf.filter.IsV(tc) then
elseif tc:IsVanguard() then
tc:RegisterFlagEffect(FLAG_SENTINEL,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
......
......@@ -25,5 +25,3 @@ function cm.op(e,tp,eg,ep,re,r,rp)
vgf.Sendto(LOCATION_SOUL,g,tc)
end
end
\ No newline at end of file
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.filter.IsR(c) and eg:IsContains(c)
return c:IsRearguard() and eg:IsContains(c)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -6,8 +6,7 @@ function cm.initial_effect(c)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Card.GetColumnGroup(c):FilterSelect(tp,cm.filter,1,1,nil,tp)
local atk=2000
local c):FilterSelect(tp,cm.filter,1,1,nil,tp:GetColumnGroup() local atk=2000
if Duel.GetFlagEffectLabel(tp,FLAG_CONDITION)==10102001 then
atk=5000
end
......
......@@ -4,7 +4,7 @@ function cm.initial_effect(c)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.filter.IsR(c) and eg:IsContains(c) and vgf.GetVMonster(tp):GetOverlayCount()>=5
return c:IsRearguard() and eg:IsContains(c) and vgf.GetVMonster(tp):GetOverlayCount()>=5
end
--对手要从手牌将卡CALL到G上之际,不将2张以上同时CALL的话则不能CALL出场。
function cm.op(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -10,8 +10,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
end
function cm.filter(c)
return vgf.filter.IsR(c) and vgf.filter.Front(c)
end
return c:IsRearguard() and c:IsFrontrow()end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_ORDER)
end
\ No newline at end of file
......@@ -17,5 +17,4 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
vgf.Sendto(LOCATION_DECK,g,tp,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
function cm.filter2(c)
return vgf.filter.Front(c) and vgf.filter.IsR(c)
end
\ No newline at end of file
return c:IsFrontrow() and c:IsRearguard()end
\ No newline at end of file
......@@ -4,13 +4,11 @@ function cm.initial_effect(c)
VgF.AddAlchemagic(m,"LOCATION_SOUL","LOCATION_DROP",1,1,function (tc) return tc:IsLevel(3) end)
end
function cm.filter(c,p)
return c:IsControler(p) and vgf.filter.IsR(c)
end
return c:IsControler(p) and c:IsRearguard()end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_OPPO,e,tp,vgf.filter.IsR,tp,0,LOCATION_CIRCLE,1,1,nil)
if g:GetCount()==0 then return end
local sg=Card.GetColumnGroup(g:GetFirst()):Filter(cm.filter,nil,1-tp)
if sg:GetCount()>0 then g:Sub(sg) end
local g:GetFirst()):Filter(cm.filter,nil,1-tp:GetColumnGroup() if sg:GetCount()>0 then g:Sub(sg) end
vgf.Sendto(LOCATION_DECK,g,nil,0,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if #og>1 then
......
......@@ -9,4 +9,3 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=vgf.AtkUp(c,c,5000,EVENT_BATTLED)
vgf.effect.Reset(c,e1,EVENT_BATTLED)
end
\ No newline at end of file
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.con.IsR and vgf.filter.IsV(Duel.GetAttackTarget()) and vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_BIND,0,1,nil,TYPE_ORDER)
return vgf.con.IsR and Duel.GetAttackTarget():IsVanguard() and vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_BIND,0,1,nil,TYPE_ORDER)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -19,8 +19,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
vgf.op.SoulCharge(1)(e,tp,eg,ep,ev,re,r,rp)
end
function cm.filter(c)
return c:IsCode(10101009) and vgf.filter.IsR(c)
end
return c:IsCode(10101009) and c:IsRearguard()end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsCode(10101009) and vgf.GetVMonster(tp):IsCode(10101001)
end
......
......@@ -4,8 +4,7 @@ function cm.initial_effect(c)
vgd.action.AbilityAct(c,m,LOCATION_SOUL,cm.op,cm.cost)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.filter.IsV(Duel.GetAttackTarget())
end
return Duel.GetAttackTarget():IsVanguard()end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.cost.CounterBlast(1)(e,tp,eg,ep,ev,re,r,rp,chk) and vgf.cost.Retire(e:GetHandler())(e,tp,eg,ep,ev,re,r,rp,chk) end
vgf.cost.CounterBlast(1)(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -12,11 +12,10 @@ function cm.filter(c)
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.con.IsR(e) and vgf.filter.Front(c) and eg:IsExists(cm.filter2,1,nil,tp)
return vgf.con.IsR(e) and c:IsFrontrow() and eg:IsExists(cm.filter2,1,nil,tp)
end
function cm.filter2(c,tp)
return c:IsPreviousLocation(LOCATION_ORDER) and c:IsPreviousControler(tp) and c:IsControler(1-tp) and vgf.filter.RideOnRCircle(c)
end
return c:IsPreviousLocation(LOCATION_ORDER) and c:IsPreviousControler(tp) and c:IsControler(1-tp) and c:IsRideOnRCircle()end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(cm.filter2,nil,tp)
......
......@@ -16,7 +16,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler()) and vgf.filter.IsV(re:GetHandler()) and vgf.con.IsR(e)
return eg:IsContains(e:GetHandler()) and re:GetHandler():IsVanguard() and vgf.con.IsR(e)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -11,8 +11,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.filter(c)
return vgf.filter.Front(c) and vgf.filter.IsR(c)
end
return c:IsFrontrow() and c:IsRearguard()end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.cost.CounterBlast(1)(e,tp,eg,ep,ev,re,r,rp,chk) and vgf.cost.SoulBlast(1)(e,tp,eg,ep,ev,re,r,rp,chk) end
vgf.cost.CounterBlast(1)(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -23,5 +23,5 @@ function cm.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.checkfilter,1,nil,tp)
end
function cm.filter(c)
return vgf.filter.IsR(c) and c:IsLevelAbove(2)
return c:IsRearguard() and c:IsLevelAbove(2)
end
\ No newline at end of file
......@@ -11,7 +11,7 @@ end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttackTarget()
if vgf.filter.IsR(tc) then
if tc:IsRearguard() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......@@ -22,7 +22,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1)
tc:RegisterEffect(e1)
vgf.effect.Reset(c,e1,EVENT_BATTLED)
elseif vgf.filter.IsV(tc) then
elseif tc:IsVanguard() then
tc:RegisterFlagEffect(FLAG_SENTINEL,RESET_EVENT+RESETS_STANDARD,0,1,m)
end
end
......
......@@ -22,11 +22,9 @@ end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then e:Reset() return end
local g=Card.GetColumnGroup(c):Filter(cm.filter,nil,tp)
vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
local c):Filter(cm.filter,nil,tp:GetColumnGroup() vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
e:Reset()
end
function cm.filter(c,tp)
return c:IsControler(tp) and vgf.filter.IsR(c)
end
\ No newline at end of file
return c:IsControler(tp) and c:IsRearguard()end
\ No newline at end of file
......@@ -15,7 +15,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if a==0 then Duel.Draw(tp,1,REASON_EFFECT) else vgf.AtkUp(c,c,5000) vgf.StarUp(c,c,1) end
end
function cm.filter(c)
return vgf.filter.IsR(c) and c:IsLevel(3)
return c:IsRearguard() and c:IsLevel(3)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_CIRCLE,0,4,nil) and vgf.con.IsR(e)
......
......@@ -11,5 +11,5 @@ function cm.initial_effect(c)
end
function cm.tg(e,tc)
local c=e:GetHandler()
return vgf.filter.Front(tc) and Card.GetColumnGroup(c):IsContains(tc) and tc:IsControler(c:GetControler())
return tc:IsFrontrow() and c):IsContains(tc:GetColumnGroup() and tc:IsControler(c:GetControler())
end
\ No newline at end of file
......@@ -19,5 +19,5 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.filter(c)
return vgf.filter.IsR(c) and c:IsLevelBelow(2)
return c:IsRearguard() and c:IsLevelBelow(2)
end
\ No newline at end of file
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