Commit 0350f450 authored by xiaoye's avatar xiaoye

10401040-10401060

parent bf0ca4ff
......@@ -530,7 +530,21 @@ function VgD.CardToGCondition(e,tp,eg,ep,ev,re,r,rp)
return c:IsLocation(LOCATION_GZONE) and Duel.GetAttackTarget()
end
function VgD.CardToGOperation(e,tp,eg,ep,ev,re,r,rp)
Duel.GetAttackTarget():RegisterFlagEffect(DefenseEntirelyFlag,RESET_EVENT+RESETS_STANDARD,0,1)
local c=e:GetHandler()
local tc=Duel.GetAttackTarget()
if vgf.RMonsterFilter(tc) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
tc:RegisterEffect(e1)
vgf.EffectReset(c,e1,EVENT_BATTLED)
elseif vgf.VMonsterFilter(tc) then
tc:RegisterFlagEffect(DefenseEntirelyFlag,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
--判定
......@@ -780,7 +794,7 @@ end
function VgD.MixCostFilter(c,e,tp,eg,ep,ev,re,r,rp,mc)
if Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_MIX_DIFFERENT_NAME) and c:IsCode(mc:GetCode()) then return false end
local ce = c:GetActivateEffect()
if not ce or (ce:GetCost() and not ce:GetCost()(e,tp,eg,ep,ev,re,r,rp,0)) then return false end
if not ce or (ce:GetCost() and not ce:GetCost()(e,tp,eg,ep,ev,re,r,rp,chk)) then return false end
local cg, cval = mc.cos_g, mc.cos_val
local bg, bval = c.cos_g, c.cos_val
if not (cg and bg and cval and bval) then return 1 end
......@@ -797,7 +811,7 @@ end
function VgD.MixCost(cost)
return function(e,tp,eg,ep,ev,re,r,rp,chk,bool)
local c=e:GetHandler()
if chk==0 then return VgF.GetValueType(cost)~="function" or cost(e,tp,eg,ep,ev,re,r,rp,0) end
if chk==0 then return VgF.GetValueType(cost)~="function" or cost(e,tp,eg,ep,ev,re,r,rp,chk) end
if not bool and (Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_MIX) and VgF.IsExistingMatchingCard(VgD.MixCostFilter,tp,LOCATION_DROP,0,1,nil,e,tp,eg,ep,ev,re,r,rp,c) and Duel.SelectYesNo(tp,VgF.Stringid(VgID,6))) then
local bc=Duel.SelectMatchingCard(tp,VgD.MixCostFilter,tp,LOCATION_DROP,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp,c):GetFirst()
if cost then cost(e,tp,eg,ep,ev,re,r,rp) end
......@@ -805,7 +819,7 @@ function VgD.MixCost(cost)
VgF.Sendto(LOCATION_REMOVED,bc,POS_FACEUP,REASON_COST)
e:SetLabelObject(bc)
local bce = bc:GetActivateEffect()
if bce and bce:GetCost() then bce:GetCost()(e,tp,eg,ep,ev,re,r,rp,1,true) end
if bce and bce:GetCost() then bce:GetCost()(e,tp,eg,ep,ev,re,r,rp,chk,true) end
end
else
if cost then cost(e,tp,eg,ep,ev,re,r,rp) end
......@@ -820,7 +834,7 @@ function VgD.SpellCondtion(con)
end
function VgD.SpellOperation(op)
return function (e,tp,eg,ep,ev,re,r,rp,bool)
if op then op(e,tp,eg,ep,ev,re,r,rp) end
if op then op(e,tp,eg,ep,ev,re,r,rp,1) end
local mc=e:GetLabelObject()
if bool or not mc then return end
local te=mc:GetActivateEffect()
......@@ -835,7 +849,7 @@ end
---@param op function|nil 触发的效果
---@param cost function|nil 效果的费用
---@param con function|nil 效果的条件
---@param tg function|nil 未知。请资讯群主。
---@param tg function|nil
function VgD.BeRidedByCard(c,m,code,op,cost,con,tg)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -889,7 +903,7 @@ end
---@param op function|nil 触发的效果
---@param cost function|nil 效果的费用
---@param con function|nil 效果触发的条件
---@param tg function|nil 未知。请资讯群主。
---@param tg function|nil
---@param count integer|nil 指示效果在同一回合内最多发动的次数
---@param property integer|nil 指示效果的特殊属性。如确有必要填,请咨询群主。
function VgD.EffectTypeTrigger(c,m,loc,typ,code,op,cost,con,tg,count,property,stringid)
......@@ -919,7 +933,7 @@ end
---@param op function|nil 触发的效果
---@param cost function|nil 效果的费用
---@param con function|nil 效果触发的条件
---@param tg function|nil 未知。请资讯群主。
---@param tg function|nil
---@param count integer|nil 指示效果在同一回合内最多发动的次数
---@param property integer|nil 指示效果的特殊属性。如确有必要填,请咨询群主。
function VgD.EffectTypeIgnition(c,m,loc,op,cost,con,tg,count,property,stringid)
......
......@@ -775,7 +775,7 @@ HINTMSG_RESOLVECARD =568 --请选择要处理效果的卡
HINTMSG_ZONE =569 --请选择[%ls]的位置
HINTMSG_CallZONE =570 --请选择圆阵
HINTMSG_TOZONE =571 --请选择要移动到的位置
HINTMSG_COUNTER =572 --请选择要放置指示物的卡
HINTMSG_TOTOP =572 --请选择要放置到牌堆顶的卡
HINTMSG_DISABLE =573 --请选择要无效的卡
HINTMSG_OPERATECARD =574 --请选择要操作的卡
HINTMSG_XMATERIAL =513 --请选择要充入魂中的卡
......
......@@ -878,6 +878,27 @@ function VgF.SelectMatchingCard(hintmsg,e,select_tp,f,tp,loc_self,loc_op,int_min
if a then Duel.ShuffleDeck(select_tp) end
return g
end
function VgF.GetMatchingGroup(f,tp,loc_self,loc_op,except_g,...)
local g=Group.CreateGroup()
if loc_self|LOCATION_MZONE>0 then
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
loc_self=loc_self-LOCATION_MZONE
if g1:GetCount()>0 then g:Merge(g1) end
end
if loc_op|LOCATION_MZONE>0 then
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
loc_op=loc_op-LOCATION_MZONE
if g1:GetCount()>0 then g:Merge(g1) end
end
if loc_self>0 or loc_op>0 then
local g1=Duel.GetMatchingGroup(nil,tp,loc_self,loc_op,nil)
if g1:GetCount()>0 then g:Merge(g1) end
end
if g:GetCount()>0 then
g=g:Filter(f,except_g,...)
end
return g
end
---用于效果的Operation。执行“把卡sg,送去loc,第三个参数开始为额外参数,内容与原函数相同。”。
---@param loc integer 要送去的区域。不填则返回0。
---@param sg integer 要操作的卡|卡片组。
......
......@@ -22,7 +22,7 @@ function cm.filter2(c)
end
--计数爆发1,灵魂爆发1
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,0) and vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,0) end
vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,1)
vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,1)
if chk==0 then return vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) and vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) end
vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
end
......@@ -17,7 +17,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
vgf.OverlayFill(1)(e,tp,eg,ep,ev,re,r,rp,1)
vgf.OverlayFill(1)(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=vgf.AtkUp(c,c,5000)
vgf.EffectReset(c,e1,EVENT_BATTLED)
end
......
......@@ -7,9 +7,9 @@ function cm.initial_effect(c)
end
--计数爆发1,灵魂爆发1
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,0) and vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,0) end
vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,1)
vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,1)
if chk==0 then return vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) and vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) end
vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
end
--选择对手的1张等级2以上的后防者
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -6,7 +6,7 @@ end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_MONSTER)
local g=vgf.SelectMatchingCard(HINTMSG_MONSTER,e,tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
local g=vgf.SelectMatchingCard(HINTMSG_MONSTER,e,tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if vgf.RMonsterFilter(tc) then
......
......@@ -11,7 +11,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Draw(tp,1,REASON_EFFECT)
vgf.OverlayFill(1)(e,tp,eg,ep,ev,re,r,rp,1)
vgf.OverlayFill(1)(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_HAND,nil)>=1 end
......@@ -24,5 +24,5 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not(c:IsSummonType(SUMMON_TYPE_RIDE) or c:IsSummonType(SUMMON_TYPE_SELFRIDE))
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
vgf.OverlayFill(2)(e,tp,eg,ep,ev,re,r,rp,1)
vgf.OverlayFill(2)(e,tp,eg,ep,ev,re,r,rp,chk)
end
\ No newline at end of file
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
vgf.OverlayFill(1)(e,tp,eg,ep,ev,re,r,rp,1)
vgf.OverlayFill(1)(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKUP)
local e1=Duel.GetMatchingGroupCount(nil,tp,LOCATION_OVERLAY,0,nil)/5
......
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_MOVE,cm.op,nil,cm.con)
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,5000,cm.con2)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_ATKUP,e,tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
vgf.AtkUp(c,g,5000)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.VMonsterCondition(e) and eg:IsExists(cm.filter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function cm.filter(c,tp)
return c:IsSetCard(0x5040) and c:IsLocation(LOCATION_ORDER) and c:IsControler(tp)
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return vgf.RMonsterCondition(e) and Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_DEEP_NIGHT) and Duel.GetTurnPlayer()==tp
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,cm.cost,cm.con)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_DEEP_NIGHT) and not (c:IsSummonType(SUMMON_TYPE_RIDE) or c:IsSummonType(SUMMON_TYPE_SELFRIDE))
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) and vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) end
vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_DISCARD,cm.op,vgf.DamageCost(1),cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
vgf.Sendto(LOCATION_MZONE,c,0,tp)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,1,nil)
end
function cm.filter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsFaceup()
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.CardToG(c,nil,cm.op)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_MONSTER)
local g=vgf.SelectMatchingCard(HINTMSG_MONSTER,e,tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if vgf.RMonsterFilter(tc) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
tc:RegisterEffect(e1)
vgf.EffectReset(c,e1,EVENT_BATTLED)
elseif vgf.VMonsterFilter(tc) then
tc:RegisterFlagEffect(DefenseEntirelyFlag,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if sg:GetCount()>=2 then
sg=sg:Select(tp,1,1,nil)
vgf.Sendto(LOCATION_DROP,sg,REASON_DISCARD+REASON_EFFECT)
end
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op,vgf.OverlayCost(2),cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.GetMatchingGroup(vgf.IsLevel,tp,LOCATION_MZONE,0,nil,3)
for tc in vgf.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(SKILL_SUPPORT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.IsExistingMatchingCard(vgf.IsLevel,tp,LOCATION_MZONE,0,2,nil,3) and vgf.RMonsterCondition(e)
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_DISCARD,cm.op,cm.cost,cm.con)
end
function cm.op(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 vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) and vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) end
vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.BeRidedByCard(c,m,10401008,cm.op)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op2,nil,cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,3)
local ct=g:GetCount()
if ct>0 then
Duel.ConfirmCards(tp,g)
if ct>1 then Duel.SortDecktop(tp,tp,ct) end
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not (c:IsSummonType(SUMMON_TYPE_RIDE) or c:IsSummonType(SUMMON_TYPE_SELFRIDE))
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(tp,1)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.DisableShuffleCheck()
if Duel.SelectOption(tp,1195,1196)==1 then
Duel.MoveSequence(g:GetFirst(),1)
vgf.AtkUp(c,c,2000)
end
end
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,cm.cost,cm.con)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not (c:IsSummonType(SUMMON_TYPE_RIDE) or c:IsSummonType(SUMMON_TYPE_SELFRIDE))
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanChangePosition() and e:GetHandler():IsPosition(POS_FACEUP_ATTACK) and vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) end
vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENCE)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,2)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOTOP)
local sg=g:select(tp,1,1,nil)
g:Sub(sg)
if g:GetCount()>0 then
Duel.MoveSequence(g:GetFirst(),1)
end
end
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.CardToG(c,nil,cm.op)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_MONSTER)
local g=vgf.SelectMatchingCard(HINTMSG_MONSTER,e,tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if vgf.RMonsterFilter(tc) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
tc:RegisterEffect(e1)
vgf.EffectReset(c,e1,EVENT_BATTLED)
elseif vgf.VMonsterFilter(tc) then
tc:RegisterFlagEffect(DefenseEntirelyFlag,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if sg:GetCount()>=2 then
sg=sg:Select(tp,1,1,nil)
vgf.Sendto(LOCATION_DROP,sg,REASON_DISCARD+REASON_EFFECT)
end
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.SearchCard(LOCATION_HAND,LOCATION_DROP,cm.filter,1,0),nil,cm.con)
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,5000,cm.con2)
vgd.GlobalCheckEffect(c,m,EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS,EVENT_CHAINING,cm.checkcon,cm.checkop)
end
function cm.con(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.filter(c)
return c:GetType()==TYPE_SPELL
end
function cm.checkcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0 and vgf.RMonsterCondition(e)
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op,cm.cost,vgf.RMonsterCondition)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_ATKUP,e,tp,nil,tp,LOCATION_MZONE,0,2,2,nil)
vgf.AtkUp(c,g,5000)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
vgf.Sendto(LOCATION_DROP,e:GetHandler(),REASON_COST)
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.CardToG(c,nil,cm.op)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_MONSTER)
local g=vgf.SelectMatchingCard(HINTMSG_MONSTER,e,tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if vgf.RMonsterFilter(tc) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
tc:RegisterEffect(e1)
vgf.EffectReset(c,e1,EVENT_BATTLED)
elseif vgf.VMonsterFilter(tc) then
tc:RegisterFlagEffect(DefenseEntirelyFlag,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if sg:GetCount()>=2 then
sg=sg:Select(tp,1,1,nil)
vgf.Sendto(LOCATION_DROP,sg,REASON_DISCARD+REASON_EFFECT)
end
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.SpellActivate(c,m,cm.op,vgf.OverlayCost(2))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(tp,4)
Duel.ConfirmCards(tp,4)
local ct=bit.ReturnCount(vgf.GetAvailableLocation(tp))
if chk>0 then
if ct>2 then ct=2 end
else
if ct>1 then ct=1 end
end
if ct>0 then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL)
local sg=g:Select(tp,1,ct,nil)
vgf.Sendto(LOCATION_MZONE,sg,0,tp)
sg=Duel.GetOperatedGroup()
vgf.AtkUp(c,sg,5000)
g:Sub(sg)
end
vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.SpellActivate(c,m,cm.op,vgf.DamageCost(1),cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_ATKUP,e,tp,nil,tp,LOCATION_MZONE,0,3,3,nil)
vgf.AtkUp(c,g,10000)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.GetVMonster(tp):IsCode(10401009)
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.SpellActivate(c,m,cm.op,vgf.OverlayCost(1))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
vgf.SearchCard(LOCATION_MZONE,LOCATION_GRAVE,cm.filter,1,1)(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetOperatedGroup()
vgf.AtkUp(c,g,10000)
end
function cm.filter(c)
local tp=c:GetControl()
local lv=vgf.GetVMonster(tp):GetLevel()
return c:IsLevelBelow(lv)
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,vgf.DamageCost(1),cm.con)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not(c:IsSummonType(SUMMON_TYPE_RIDE) or c:IsSummonType(SUMMON_TYPE_SELFRIDE))
and vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_LEAVEONFIELD,e,tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
end
function cm.filter(c)
return c:GetFlagEffectLabel(ConditionFlag)==201
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.op,nil,cm.con)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.GetMatchingGroup(vgf.RMonsterFilter,tp,0,LOCATION_MZONE,nil):GetCount()<=2 and vgf.RMonsterCondition(e)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=vgf.AtkUp(c,c,5000)
vgf.EffectReset(c,e1,EVENT_BATTLED)
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_MOVE,cm.op,vgf.OverlayCost(1),cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=vgf.DefUp(c,c,5000)
vgf.EffectReset(c,e1,EVENT_BATTLED)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GZONE) and c:IsPreviousLocation(LOCATION_MZONE)
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_CUSTOM+EVENT_SUPPORT,cm.op,nil,cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=vgf.DefUp(c,c,2000)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsContains(c)
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.BeRidedByCard(c,m,10401027,vgf.OverlayFill(1))
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_TO_GRAVE,cm.op,cm.cost,cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_LEAVEONFIELD,e,tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
end
function cm.filter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(1-tp)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,tp) and Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.GetTurnPlayer()==tp
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
return c:IsAbleToGraveAsCost() and vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
end
vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
vgf.Sendto(LOCATION_DROP,c,REASON_COST)
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