Commit d05eeaed authored by jwyxym's avatar jwyxym Committed by GitHub

Add files via upload

parent e5c11ca4
...@@ -395,6 +395,7 @@ function VgD.MonsterPosDefenseOperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -395,6 +395,7 @@ function VgD.MonsterPosDefenseOperation(e,tp,eg,ep,ev,re,r,rp)
label=label+2 label=label+2
end end
c:RegisterFlagEffect(AttackTriggerFlag,RESET_EVENT+RESETS_STANDARD+EVENT_PRE_BATTLE_DAMAGE,0,1,label) c:RegisterFlagEffect(AttackTriggerFlag,RESET_EVENT+RESETS_STANDARD+EVENT_PRE_BATTLE_DAMAGE,0,1,label)
Duel.RaiseEvent(c,EVENT_CUSTOM+EVENT_TRIGGERCOUNTUP,e,0,tp,tp,0)
end end
function VgD.MonsterPosAttackOperation(e,tp,eg,ep,ev,re,r,rp) function VgD.MonsterPosAttackOperation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_MZONE,0,nil,POS_FACEUP_DEFENSE) local g=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_MZONE,0,nil,POS_FACEUP_DEFENSE)
...@@ -933,13 +934,15 @@ function VgD.EffectTypeIgnition(c,m,loc,op,cost,con,tg,count,property,stringid) ...@@ -933,13 +934,15 @@ function VgD.EffectTypeIgnition(c,m,loc,op,cost,con,tg,count,property,stringid)
if VgF.GetValueType(op)=="function" then e1:SetOperation(op) end if VgF.GetValueType(op)=="function" then e1:SetOperation(op) end
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function VgD.EffectTypeTriggerWhenHitting(c,m,loc,typ,op,cost,con,tg,count,property,stringid) function VgD.EffectTypeTriggerWhenHitting(c,m,loc,typ,op,cost,con,tg,count,p,property,stringid)
if not typ or typ==0 then typ=EFFECT_TYPE_SINGLE end if not typ or typ==0 then typ=EFFECT_TYPE_SINGLE end
VgD.EffectTypeTrigger(c,m,loc,EFFECT_TYPE_FIELD,EVENT_CUSTOM+EVENT_DAMAGE_TRIGGER,op,cost,VgD.EffectTypeTriggerWhenHittingCon(typ,con),tg,count,property,stringid) if not p then p=c:GetControler() end
VgD.EffectTypeTrigger(c,m,loc,EFFECT_TYPE_FIELD,EVENT_CUSTOM+EVENT_DAMAGE_TRIGGER,op,cost,VgD.EffectTypeTriggerWhenHittingCon(typ,con,p),tg,count,property,stringid)
VgD.EffectTypeTrigger(c,m,loc,typ,EVENT_BATTLE_DESTROYING,op,cost,con,tg,count,property,stringid) VgD.EffectTypeTrigger(c,m,loc,typ,EVENT_BATTLE_DESTROYING,op,cost,con,tg,count,property,stringid)
end end
function VgD.EffectTypeTriggerWhenHittingCon(typ,con) function VgD.EffectTypeTriggerWhenHittingCon(typ,con,p)
return function (e,tp,eg,ep,ev,re,r,rp) return function (e,tp,eg,ep,ev,re,r,rp)
if Duel.GetAttacker():GetControler()~=p then return false end
if typ==EFFECT_TYPE_SINGLE then if typ==EFFECT_TYPE_SINGLE then
if VgF.GetValueType(con)~="function" or con(e,tp,eg,ep,ev,re,r,rp) then if VgF.GetValueType(con)~="function" or con(e,tp,eg,ep,ev,re,r,rp) then
return Duel.GetAttacker()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler()
...@@ -980,17 +983,41 @@ function VgD.ContinuousSpellOperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -980,17 +983,41 @@ function VgD.ContinuousSpellOperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Sendto(c,tp,LOCATION_ORDER,POS_FACEUP_ATTACK,REASON_RULE) Duel.Sendto(c,tp,LOCATION_ORDER,POS_FACEUP_ATTACK,REASON_RULE)
end end
function VgD.EffectTypeContinuousChangeAttack(c,typ,val,con,tg,mc,code,reset) function VgD.EffectTypeContinuousChangeAttack(c,typ,val,con,tg,mc,code,reset,loc)
if VgF.GetValueType(mc)~="Card" then mc=c end if VgF.GetValueType(mc)~="Card" then mc=c end
if not typ then typ=EFFECT_TYPE_SINGLE end if not typ then typ=EFFECT_TYPE_SINGLE end
if not code then code=EFFECT_UPDATE_ATTACK end if not code then code=EFFECT_UPDATE_ATTACK end
if not loc then loc=LOCATION_MZONE end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(typ) e1:SetType(typ)
e1:SetCode(code) e1:SetCode(code)
e1:SetRange(LOCATION_MZONE) e1:SetRange(loc)
if reset>0 then e1:SetReset(reset) end if reset>0 then e1:SetReset(reset) end
if VgF.GetValueType(con)=="function" then e1:SetCondition(con) end if VgF.GetValueType(con)=="function" then e1:SetCondition(con) end
if VgF.GetValueType(tg)=="function" then e1:SetTarget(tg) end if VgF.GetValueType(tg)=="function" then e1:SetTarget(tg) end
e1:SetValue(val) e1:SetValue(val)
mc:RegisterEffect(e1) mc:RegisterEffect(e1)
end
function VgD.TriggerCountUp(c,num,reset)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CUSTOM+EVENT_TRIGGERCOUNTUP)
e1:SetProperty(EFFECT_FLAG_DELAY)
if reset>0 then e1:SetReset(reset) end
e1:SetOperation(VgD.TriggerCountUpOperation(num))
c:RegisterEffect(e1)
end
function VgD.TriggerCountUpOperation(num)
return function (e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local label=c:GetFlagEffectLabel(AttackTriggerFlag)
if not label then
label=label+num
c:ResetFlagEffect(AttackTriggerFlag)
c:RegisterFlagEffect(AttackTriggerFlag,RESET_EVENT+RESETS_STANDARD+EVENT_PRE_BATTLE_DAMAGE,0,1,label)
else
c:RegisterFlagEffect(AttackTriggerFlag,RESET_EVENT+RESETS_STANDARD+EVENT_PRE_BATTLE_DAMAGE,0,1,num)
end
end
end end
\ No newline at end of file
...@@ -674,6 +674,7 @@ EVENT_CRITICAL_STRIKE =VgID+1 --暴击值结算时点 ...@@ -674,6 +674,7 @@ EVENT_CRITICAL_STRIKE =VgID+1 --暴击值结算时点
EVENT_DAMAGE_TRIGGER =VgID+2 --受伤判定完毕时点 EVENT_DAMAGE_TRIGGER =VgID+2 --受伤判定完毕时点
EVENT_RIDE_START =VgID+3 --骑升时点 EVENT_RIDE_START =VgID+3 --骑升时点
EVENT_SUPPORT =VgID+4 --支援时点 EVENT_SUPPORT =VgID+4 --支援时点
EVENT_TRIGGERCOUNTUP =VgID+5 --驱动追加
--攻击时(EVENT_ATTACK_ANNOUNCE) --攻击时(EVENT_ATTACK_ANNOUNCE)
--支援时(EVENT_CUSTOM+EVENT_SUPPORT) --支援时(EVENT_CUSTOM+EVENT_SUPPORT)
...@@ -719,20 +720,19 @@ OPCODE_ISATTRIBUTE =0x40000104 ...@@ -719,20 +720,19 @@ OPCODE_ISATTRIBUTE =0x40000104
DOUBLE_DAMAGE =-2147483648 DOUBLE_DAMAGE =-2147483648
HALF_DAMAGE =-2147483647 HALF_DAMAGE =-2147483647
--Hint Message --提示消息,显示在窗口的上面 --Hint Message --提示消息,显示在窗口的上面
HINTMSG_RELEASE =500 --请选择要解放的卡 HINTMSG_RELEASE =500
HINTMSG_DISCARD =501 --请选择要丢弃的手牌 HINTMSG_DISCARD =501 --请选择要丢弃的手牌
HINTMSG_DESTROY =502 --请选择要破坏的卡 HINTMSG_DESTROY =502 --
HINTMSG_REMOVE =503 --请选择要除外的卡 HINTMSG_REMOVE =503 --请选择要除外的卡
HINTMSG_TOGRAVE =504 --请选择要送去墓地的卡 HINTMSG_TOGRAVE =504 --
HINTMSG_RTOHAND =505 --请选择要返回手牌的卡 HINTMSG_RTOHAND =505 --请选择要返回手牌的卡
HINTMSG_ATOHAND =506 --请选择要加入手牌的卡 HINTMSG_ATOHAND =506 --请选择要加入手牌的卡
HINTMSG_TODECK =507 --请选择要返回卡组的卡 HINTMSG_TODECK =507 --请选择要返回卡组的卡
HINTMSG_SUMMON =508 --请选择要召唤的卡 HINTMSG_SUMMON =508 --
HINTMSG_SPSUMMON =509 --请选择要特殊召唤的卡 HINTMSG_SPSUMMON =509 --请选择要特殊召唤的卡
HINTMSG_SET =510 --请选择要盖放的卡 HINTMSG_SET =510 --
HINTMSG_FMATERIAL =511 --请选择要作为融合素材的卡 HINTMSG_FMATERIAL =511 --
HINTMSG_SMATERIAL =512 --请选择要作为同调素材的卡 HINTMSG_SMATERIAL =512 --
HINTMSG_XMATERIAL =513 --请选择要充入魂中的卡
HINTMSG_FACEUP =514 --请选择表侧表示的卡 HINTMSG_FACEUP =514 --请选择表侧表示的卡
HINTMSG_FACEDOWN =515 --请选择里侧表示的卡 HINTMSG_FACEDOWN =515 --请选择里侧表示的卡
HINTMSG_ATTACK =516 --请选择攻击表示的怪兽 HINTMSG_ATTACK =516 --请选择攻击表示的怪兽
...@@ -741,7 +741,7 @@ HINTMSG_EQUIP =518 --请选择要装备的卡 ...@@ -741,7 +741,7 @@ HINTMSG_EQUIP =518 --请选择要装备的卡
HINTMSG_REMOVEXYZ =519 --请选择要取除的超量素材 HINTMSG_REMOVEXYZ =519 --请选择要取除的超量素材
HINTMSG_CONTROL =520 --请选择要改变控制权的怪兽 HINTMSG_CONTROL =520 --请选择要改变控制权的怪兽
HINTMSG_DESREPLACE =521 --请选择要代替破坏的卡 HINTMSG_DESREPLACE =521 --请选择要代替破坏的卡
HINTMSG_FACEUPATTACK =522 --请选择表侧攻击表示的怪兽 HINTMSG_FACEUPATTACK =522 --
HINTMSG_FACEUPDEFENSE =523 --请选择表侧守备表示的怪兽 HINTMSG_FACEUPDEFENSE =523 --请选择表侧守备表示的怪兽
HINTMSG_FACEDOWNATTACK =524 --请选择里侧攻击表示的怪兽 HINTMSG_FACEDOWNATTACK =524 --请选择里侧攻击表示的怪兽
HINTMSG_FACEDOWNDEFENSE =525 --请选择里侧守备表示的怪兽 HINTMSG_FACEDOWNDEFENSE =525 --请选择里侧守备表示的怪兽
...@@ -775,12 +775,14 @@ HINTMSG_TOZONE =571 --请选择要移动到的位置 ...@@ -775,12 +775,14 @@ HINTMSG_TOZONE =571 --请选择要移动到的位置
HINTMSG_COUNTER =572 --请选择要放置指示物的卡 HINTMSG_COUNTER =572 --请选择要放置指示物的卡
HINTMSG_DISABLE =573 --请选择要无效的卡 HINTMSG_DISABLE =573 --请选择要无效的卡
HINTMSG_OPERATECARD =574 --请选择要操作的卡 HINTMSG_OPERATECARD =574 --请选择要操作的卡
HINTMSG_XMATERIAL =513 --请选择要充入魂中的卡
HINTMSG_LEAVEONFIELD =HINTMSG_RELEASE --请选择要退场的卡 HINTMSG_LEAVEONFIELD =HINTMSG_RELEASE --请选择要退场的卡
HINTMSG_TODROP =HINTMSG_TOGRAVE --请选择要置入弃牌区的卡 HINTMSG_TODROP =HINTMSG_TOGRAVE --请选择要置入弃牌区的卡
HINTMSG_CALL =HINTMSG_SUMMON --请选择要Call到圆阵的卡 HINTMSG_CALL =HINTMSG_SUMMON --请选择要Call到圆阵的卡
HINTMSG_DAMAGE =HINTMSG_SET --请选择要消耗的费用 HINTMSG_DAMAGE =HINTMSG_SET --请选择要消耗的费用
HINTMSG_ATKUP =HINTMSG_FMATERIAL --请选择力量上升的卡 HINTMSG_ATKUP =HINTMSG_FMATERIAL --请选择力量上升的卡
HINTMSG_CRITICAL_STRIKE =HINTMSG_SMATERIAL --请选择☆值上升的卡 HINTMSG_CRITICAL_STRIKE =HINTMSG_SMATERIAL --请选择☆值上升的卡
HINTMSG_IMPRISON =HINTMSG_DESTROY --请选择要收容的卡
HINTMSG_VMONSTER =HINTMSG_FACEUPATTACK --请选择先导者 HINTMSG_VMONSTER =HINTMSG_FACEUPATTACK --请选择先导者
--Select --请选择 --Select --请选择
SELECT_HEADS =60 --正面 SELECT_HEADS =60 --正面
...@@ -864,6 +866,7 @@ DefenseEntirelyFlag =VgID+3 --完全防御标识 ...@@ -864,6 +866,7 @@ DefenseEntirelyFlag =VgID+3 --完全防御标识
ConditionFlag =VgID+4 --处于XX状态标识 ConditionFlag =VgID+4 --处于XX状态标识
SupportFlag =VgID+5 --支援状态标识 SupportFlag =VgID+5 --支援状态标识
AttackAtRearFlag =VgID+6 --后列攻击 AttackAtRearFlag =VgID+6 --后列攻击
ImprisonFlag =VgID+6 --被收容
--AffectedByEffect --AffectedByEffect
AFFECT_CODE_MIX =VgID --魔合成 AFFECT_CODE_MIX =VgID --魔合成
AFFECT_CODE_MIX_DIFFERENT_NAME =VgID+1 --魔合成(卡名不同) AFFECT_CODE_MIX_DIFFERENT_NAME =VgID+1 --魔合成(卡名不同)
......
...@@ -293,7 +293,7 @@ function VgF.tgoval(e,re,rp) ...@@ -293,7 +293,7 @@ function VgF.tgoval(e,re,rp)
end end
function VgF.GetAvailableLocation(tp,zone) function VgF.GetAvailableLocation(tp,zone)
local z local z
if zone then z=zone else z==0xe0 end if zone then z=zone else z=0xe0 end
local rg=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_MZONE,0,nil,POS_FACEDOWN_ATTACK) local rg=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_MZONE,0,nil,POS_FACEDOWN_ATTACK)
for tc in VgF.Next(rg) do for tc in VgF.Next(rg) do
local szone=VgF.SequenceToGlobal(tp,tc:GetLocation(),tc:GetSequence()) local szone=VgF.SequenceToGlobal(tp,tc:GetLocation(),tc:GetSequence())
...@@ -324,32 +324,33 @@ function VgF.Call(g,sumtype,tp,zone,pos) ...@@ -324,32 +324,33 @@ function VgF.Call(g,sumtype,tp,zone,pos)
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
end end
return Duel.SpecialSummon(g,sumtype,tp,tp,false,false,pos,szone) return Duel.SpecialSummon(g,sumtype,tp,tp,false,false,pos,szone)
end else
local sg local sg
local z=VgF.GetAvailableLocation(tp) local z=VgF.GetAvailableLocation(tp)
if VgF.GetValueType(g)=="Card" then sg=Group.FromCards(g) else sg=Group.Clone(g) end if VgF.GetValueType(g)=="Card" then sg=Group.FromCards(g) else sg=Group.Clone(g) end
for sc in VgF.Next(sg) do for sc in VgF.Next(sg) do
if sc:IsLocation(LOCATION_EXTRA) then if sc:IsLocation(LOCATION_EXTRA) then
local rc=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst() local rc=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst()
local mg=rc:GetOverlayGroup() local mg=rc:GetOverlayGroup()
if mg:GetCount()~=0 then if mg:GetCount()~=0 then
Duel.Overlay(sc,mg) Duel.Overlay(sc,mg)
end end
sc:SetMaterial(Group.FromCards(rc)) sc:SetMaterial(Group.FromCards(rc))
Duel.Overlay(sc,Group.FromCards(rc)) Duel.Overlay(sc,Group.FromCards(rc))
Duel.SpecialSummonStep(sc,sumtype,tp,tp,false,false,pos,0x20) Duel.SpecialSummonStep(sc,sumtype,tp,tp,false,false,pos,0x20)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CallZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CallZONE)
local szone=Duel.SelectField(tp,1,LOCATION_MZONE,0,z) local szone=Duel.SelectField(tp,1,LOCATION_MZONE,0,z)
if Duel.IsExistingMatchingCard(VgD.CallFilter,tp,LOCATION_MZONE,0,1,nil,tp,szone) then if Duel.IsExistingMatchingCard(VgD.CallFilter,tp,LOCATION_MZONE,0,1,nil,tp,szone) then
local tc=Duel.GetMatchingGroup(VgD.CallFilter,tp,LOCATION_MZONE,0,nil,tp,szone):GetFirst() local tc=Duel.GetMatchingGroup(VgD.CallFilter,tp,LOCATION_MZONE,0,nil,tp,szone):GetFirst()
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
end
Duel.SpecialSummonStep(sc,sumtype,tp,tp,false,false,pos,szone)
z=bit.bor(z,szone)
end end
Duel.SpecialSummonStep(sc,sumtype,tp,tp,false,false,pos,szone)
z=bit.bor(z,szone)
end end
return Duel.SpecialSummonComplete()
end end
return Duel.SpecialSummonComplete()
end end
function VgF.LvCondition(e_or_c) function VgF.LvCondition(e_or_c)
local c=VgF.GetValueType(e_or_c)=="Effect" and e_or_c:GetHandler() or e_or_c local c=VgF.GetValueType(e_or_c)=="Effect" and e_or_c:GetHandler() or e_or_c
...@@ -589,14 +590,14 @@ function VgF.SearchCardSpecialSummonOP(loc,f,e,tp,eg,ep,ev,re,r,rp) ...@@ -589,14 +590,14 @@ function VgF.SearchCardSpecialSummonOP(loc,f,e,tp,eg,ep,ev,re,r,rp)
end end
end end
function Group.CheckSubGroup(g,f,min,max,...) function Group.CheckSubGroup(g,f,min,max,...)
min = min or 1 min=min or 1
max = max or #g max=max or #g
if min > max then return false end if min > max then return false end
local ext_params = {...} local ext_params={...}
-- selected group -- selected group
local sg = Group.CreateGroup() local sg=Group.CreateGroup()
-- be select group -- be select group
local bg = g:Clone() local bg=g:Clone()
for c in VgF.Next(g) do for c in VgF.Next(g) do
if VgF.CheckGroupRecursiveCapture(c,sg,bg,f,min,max,ext_params) then return true end if VgF.CheckGroupRecursiveCapture(c,sg,bg,f,min,max,ext_params) then return true end
bg:RemoveCard(c) bg:RemoveCard(c)
...@@ -604,16 +605,16 @@ function Group.CheckSubGroup(g,f,min,max,...) ...@@ -604,16 +605,16 @@ function Group.CheckSubGroup(g,f,min,max,...)
return false return false
end end
function VgF.CheckGroupRecursiveCapture(c,sg,bg,f,min,max,ext_params) function VgF.CheckGroupRecursiveCapture(c,sg,bg,f,min,max,ext_params)
sg = sg + c sg=sg+c
if VgF.G_Add_Check and not VgF.G_Add_Check(sg,c,bg) then if VgF.G_Add_Check and not VgF.G_Add_Check(sg,c,bg) then
sg = sg - c sg=sg-c
return false return false
end end
local res = #sg >= min and #sg <= max and (not f or f(sg,table.unpack(ext_params))) local res=#sg >= min and #sg<=max and (not f or f(sg,table.unpack(ext_params)))
if not res and #sg < max then if not res and #sg<max then
res = bg:IsExists(VgF.CheckGroupRecursiveCapture,1,sg,sg,bg,f,min,max,ext_params) res=bg:IsExists(VgF.CheckGroupRecursiveCapture,1,sg,sg,bg,f,min,max,ext_params)
end end
sg = sg - c sg=sg-c
return res return res
end end
---返回p场上的先导者。 ---返回p场上的先导者。
...@@ -644,14 +645,16 @@ end ...@@ -644,14 +645,16 @@ end
---@param g Card|Group ---@param g Card|Group
---@param p integer ---@param p integer
function VgF.SendtoPrison(g,p) function VgF.SendtoPrison(g,p)
if not VgF.CheckPrison(p) then return end if not VgF.CheckPrison(p) or not g then return end
local og=Duel.GetFieldGroup(p,LOCATION_ORDER,0) local og=Duel.GetFieldGroup(p,LOCATION_ORDER,0)
local oc=og:Filter(VgF.PrisonFilter,nil,og:GetCount()):GetFirst() local oc=og:Filter(VgF.PrisonFilter,nil,og:GetCount()):GetFirst()
if VgF.GetValueType(g) == "Card" then if VgF.GetValueType(g)=="Card" then
Duel.Sendto(g,p,LOCATION_ORDER,POS_FACEUP_ATTACK,REASON_EFFECT) Duel.Sendto(g,p,LOCATION_ORDER,POS_FACEUP_ATTACK,REASON_EFFECT)
elseif VgF.GetValueType(g) == "Group" then g:RegisterFlagEffect(ImprisonFlag,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,vgf.Stringid(10105015,0))
elseif VgF.GetValueType(g)=="Group" then
for tc in VgF.Next(g) do for tc in VgF.Next(g) do
Duel.Sendto(tc,p,LOCATION_ORDER,POS_FACEUP_ATTACK,REASON_EFFECT) Duel.Sendto(tc,p,LOCATION_ORDER,POS_FACEUP_ATTACK,REASON_EFFECT)
tc:RegisterFlagEffect(ImprisonFlag,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,vgf.Stringid(10105015,0))
end end
end end
Duel.MoveSequence(oc,og:GetCount()-1) Duel.MoveSequence(oc,og:GetCount()-1)
......
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op1,vgf.DamageCost(1),nil,nil,1)
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,10000,cm.con)
vgd.TriggerCountUp(c,1)
end end
function cm.con(e,c)
local tp=e:GetHandler()
return Duel.GetTurnPlayer()==tp and vgf.VMonsterCondition(e) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,1,nil)
end
function cm.filter(c)
return c:GetFlagEffect(ImprisonFlag)>0
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
if not vgf.CheckPrison(tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_IMPRISON)
local g1=Duel.SelectMatchingCard(tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,2,2,nil)
vgf.SendtoPrison(g1,tp)
end
\ No newline at end of file
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.operation,nil,cm.condition)
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,2000,cm.con)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not vgf.CheckPrison(tp) then return end
Duel.Hint(HINT_MESSAGE,1-tp,HINTMSG_IMPRISON)
local g=Duel.SelectMatchingCard(1-tp,nil,tp,LOCATION_HAND,0,1,1,nil)
vgf.SendtoPrison(g,tp)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_RIDE) or c:IsSummonType(SUMMON_TYPE_SELFRIDE)
end
function cm.con(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return vgf.RMonsterFilter(c) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,1,nil)
end
function cm.filter(c)
return c:GetFlagEffect(ImprisonFlag)>0
end
\ No newline at end of file
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.SearchCard(LOCATION_DECK,cm.filter),nil,cm.condition)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.operation1,cm.cost,cm.condition1)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_RIDE) and c:IsSummonType(SUMMON_TYPE_SELFRIDE)
end
function cm.filter(c)
return c:IsSetCard(0x3040)
end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not cm.condition(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_ORDER,0,1,nil)
end
function cm.filter1(c)
return c:GetFlagEffect(ImprisonFlag)>0
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_DAMAGE,0,1,nil) and Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup():FilterCount(Card.IsAbleToGraveAsCost,nil)>=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DAMAGE)
local g1=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_DAMAGE,0,1,1,nil)
Duel.ChangePosition(g1,POS_FACEDOWN)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g2=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():FilterSelect(tp,Card.IsAbleToGraveAsCost,1,1,nil)
Duel.SendtoGrave(g2,REASON_COST)
end
\ No newline at end of file
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.EffectTypeTriggerWhenHitting(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,cm.operation,nil,cm.condition)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.RMonsterFilter(c) and vgf.IsSequence(Duel.GetAttackTarget(),5)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not vgf.CheckPrison(tp) then return end
Duel.Hint(HINT_MESSAGE,1-tp,HINTMSG_IMPRISON)
local g=Duel.SelectMatchingCard(tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,0,2,nil)
vgf.SendtoPrison(g,tp)
end
\ No newline at end of file
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.operation,vgf.OverlayCost(1),cm.condition)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.RMonsterFilter(c) and vgf.CheckPrison(tp)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not vgf.CheckPrison(tp) then return end
Duel.Hint(HINT_MESSAGE,tp,HINTMSG_IMPRISON)
local g=Duel.SelectMatchingCard(tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
vgf.SendtoPrison(g,tp)
end
\ No newline at end of file
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,2000,con)
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,5000,con,tg,c,EFFECT_UPDATE_DEFENSE,reset,LOCATION_GRAVE)
end end
function cm.con(e,c)
local tp=e:GetHandler()
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,1,nil)
end
function cm.filter(c)
return c:GetFlagEffect(ImprisonFlag)>0
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