Commit 6e162cd5 authored by xiaoye's avatar xiaoye

update VgF.SearchCard and VgF.Sendto

parent b053d276
...@@ -77,7 +77,7 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,7 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
if sc:IsLocation(LOCATION_EXTRA) then if sc:IsLocation(LOCATION_EXTRA) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,VgD.DisCardRideUpFilter,tp,LOCATION_HAND,0,1,1,nil,e,lv,code,rc) local g=Duel.SelectMatchingCard(tp,VgD.DisCardRideUpFilter,tp,LOCATION_HAND,0,1,1,nil,e,lv,code,rc)
VgF.Sendto(LOCATION_GRAVE,g,REASON_COST+REASON_DISCARD) VgF.Sendto(LOCATION_DROP,g,REASON_COST+REASON_DISCARD)
end end
local mg=rc:GetOverlayGroup() local mg=rc:GetOverlayGroup()
if mg:GetCount()~=0 then if mg:GetCount()~=0 then
...@@ -163,7 +163,7 @@ function VgD.CallOperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -163,7 +163,7 @@ function VgD.CallOperation(e,tp,eg,ep,ev,re,r,rp)
local zone=Duel.SelectField(tp,1,LOCATION_MZONE,0,z) local zone=Duel.SelectField(tp,1,LOCATION_MZONE,0,z)
if Duel.IsExistingMatchingCard(VgD.CallFilter,tp,LOCATION_MZONE,0,1,nil,tp,zone) then if Duel.IsExistingMatchingCard(VgD.CallFilter,tp,LOCATION_MZONE,0,1,nil,tp,zone) then
local tc=Duel.GetMatchingGroup(VgD.CallFilter,tp,LOCATION_MZONE,0,nil,tp,zone):GetFirst() local tc=Duel.GetMatchingGroup(VgD.CallFilter,tp,LOCATION_MZONE,0,nil,tp,zone):GetFirst()
VgF.Sendto(LOCATION_GRAVE,tc,REASON_COST) VgF.Sendto(LOCATION_DROP,tc,REASON_COST)
end end
e:SetValue(function () return SUMMON_VALUE_CALL,zone end) e:SetValue(function () return SUMMON_VALUE_CALL,zone end)
end end
...@@ -486,7 +486,7 @@ function VgD.SendToGOperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -486,7 +486,7 @@ function VgD.SendToGOperation(e,tp,eg,ep,ev,re,r,rp)
end end
function VgD.GToGraveOperation(e,tp,eg,ep,ev,re,r,rp) function VgD.GToGraveOperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
VgF.Sendto(LOCATION_GRAVE,c,REASON_RULE) VgF.Sendto(LOCATION_DROP,c,REASON_RULE)
end end
function VgD.MonsterAttackAnnounceCondition(e,c) function VgD.MonsterAttackAnnounceCondition(e,c)
return e:GetHandler():IsPosition(POS_DEFENSE) or (VgF.IsSequence(e:GetHandler(),1,2,3) and e:GetHandler():GetFlagEffect(AttackAtRearFlag)==0) return e:GetHandler():IsPosition(POS_DEFENSE) or (VgF.IsSequence(e:GetHandler(),1,2,3) and e:GetHandler():GetFlagEffect(AttackAtRearFlag)==0)
...@@ -583,7 +583,7 @@ function VgD.CardTriggerOperation(chkop,f) ...@@ -583,7 +583,7 @@ function VgD.CardTriggerOperation(chkop,f)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODROP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODROP)
local tc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_DAMAGE,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_DAMAGE,0,1,1,nil):GetFirst()
if tc then if tc then
VgF.Sendto(LOCATION_GRAVE,tc,REASON_TRIGGER) VgF.Sendto(LOCATION_DROP,tc,REASON_TRIGGER)
Duel.Recover(tp,1,REASON_RULE) Duel.Recover(tp,1,REASON_RULE)
end end
end end
...@@ -777,7 +777,7 @@ function VgF.MixFilter(mg, cf, cval, bf, bmin, bmax, bval) ...@@ -777,7 +777,7 @@ function VgF.MixFilter(mg, cf, cval, bf, bmin, bmax, bval)
end end
end end
function VgD.MixCostFilter(c,e,tp,eg,ep,ev,re,r,rp,mc) 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 if Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_MIX_DIFFERENT_NAME) and c:IsCode(mc:GetCode()) then return false end
local ce = c:GetActivateEffect() 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,0)) then return false end
local cg, cval = mc.cos_g, mc.cos_val local cg, cval = mc.cos_g, mc.cos_val
...@@ -797,8 +797,8 @@ function VgD.MixCost(cost) ...@@ -797,8 +797,8 @@ function VgD.MixCost(cost)
return function(e,tp,eg,ep,ev,re,r,rp,chk,bool) return function(e,tp,eg,ep,ev,re,r,rp,chk,bool)
local c=e:GetHandler() 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,0) end
if not bool and (Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_MIX) and Duel.IsExistingMatchingCard(VgD.MixCostFilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,eg,ep,ev,re,r,rp,c) and Duel.SelectYesNo(tp,VgF.Stringid(VgID,6))) then if not bool and (Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_MIX) and Duel.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_GRAVE,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp,c):GetFirst() 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 if cost then cost(e,tp,eg,ep,ev,re,r,rp) end
if bc then if bc then
VgF.Sendto(LOCATION_REMOVED,bc,POS_FACEUP,REASON_COST) VgF.Sendto(LOCATION_REMOVED,bc,POS_FACEUP,REASON_COST)
......
...@@ -339,7 +339,7 @@ function VgF.Call(g,sumtype,tp,zone,pos,chk) ...@@ -339,7 +339,7 @@ function VgF.Call(g,sumtype,tp,zone,pos,chk)
VgF.Sendto(LOCATION_OVERLAY,Group.FromCards(tc),sc) VgF.Sendto(LOCATION_OVERLAY,Group.FromCards(tc),sc)
elseif Duel.IsExistingMatchingCard(VgD.CallFilter,tp,LOCATION_MZONE,0,1,nil,tp,szone) then elseif 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()
VgF.Sendto(LOCATION_GRAVE,tc,REASON_COST) VgF.Sendto(LOCATION_DROP,tc,REASON_COST)
end end
return Duel.SpecialSummon(sc,sumtype,tp,tp,false,false,pos,szone) return Duel.SpecialSummon(sc,sumtype,tp,tp,false,false,pos,szone)
else else
...@@ -362,7 +362,7 @@ function VgF.Call(g,sumtype,tp,zone,pos,chk) ...@@ -362,7 +362,7 @@ function VgF.Call(g,sumtype,tp,zone,pos,chk)
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()
VgF.Sendto(LOCATION_GRAVE,tc,REASON_COST) VgF.Sendto(LOCATION_DROP,tc,REASON_COST)
end end
Duel.SpecialSummonStep(sc,sumtype,tp,tp,false,false,pos,szone) Duel.SpecialSummonStep(sc,sumtype,tp,tp,false,false,pos,szone)
z=bit.bor(z,szone) z=bit.bor(z,szone)
...@@ -491,198 +491,198 @@ function VgF.StarUp(c,g,val,reset,resetcount) ...@@ -491,198 +491,198 @@ function VgF.StarUp(c,g,val,reset,resetcount)
return e1,e2 return e1,e2
end end
end end
---用于效果的Operation。它返回一个执行“[计数回充num]”的函数。
---@param num integer 计数回充的数量
---@return function 效果的Operation函数
function VgF.DamageFill(num)
return function (e,tp,eg,ep,ev,re,r,rp)
return VgF.DamageFillOP(num,e,tp,eg,ep,ev,re,r,rp)
end
end
function VgF.DamageFillOP(num,e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_DAMAGE,0,num,num,nil)
Duel.ChangePosition(g,POS_FACEUP_ATTACK)
return Duel.GetOperatedGroup():GetCount()
end
---判断c是否可以以规则的手段到G区域。 ---判断c是否可以以规则的手段到G区域。
---@param c Card 要判断的卡 ---@param c Card 要判断的卡
---@return boolean 指示c能否去到G区域。 ---@return boolean 指示c能否去到G区域。
function VgF.IsAbleToGZone(c,loc) function VgF.IsAbleToGZone(c,loc)
local tp=c:GetControler()
if loc==LOCATION_HAND then if loc==LOCATION_HAND then
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER)
elseif loc==LOCATION_MZONE then elseif loc==LOCATION_MZONE then
return c:IsAttribute(SKILL_BLOCK) and VgF.IsSequence(c,0,4) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() return c:IsAttribute(SKILL_BLOCK) and VgF.IsSequence(c,0,4) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup()
end end
return false
end
---用于效果的Operation。它返回一个执行“[计数回充num]”的函数。
---@param num integer 计数回充的数量
---@return function 效果的Operation函数
function VgF.DamageFill(num)
return function (e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_DAMAGE,0,num,num,nil)
Duel.ChangePosition(g,POS_FACEUP_ATTACK)
return Duel.GetOperatedGroup():GetCount()
end
end end
---用于效果的Cost。它返回一个执行“【费用】[将手牌中的num张卡舍弃]”的函数。 ---用于效果的Cost。它返回一个执行“【费用】[将手牌中的num张卡舍弃]”的函数。
---@param num integer 要舍弃的卡的数量 ---@param num integer 要舍弃的卡的数量
---@return function 效果的Cost函数 ---@return function 效果的Cost函数
function VgF.DisCardCost(num) function VgF.DisCardCost(num)
return function (e,tp,eg,ep,ev,re,r,rp,chk) return function (e,tp,eg,ep,ev,re,r,rp,chk)
return VgF.DisCardCostOP(num,e,tp,eg,ep,ev,re,r,rp,chk) if VgF.GetValueType(num)~="number" then return 0 end
end local c=e:GetHandler()
end local m=c:GetOriginalCode()
function VgF.DisCardCostOP(num,e,tp,eg,ep,ev,re,r,rp,chk) local cm=_G["c"..m]
local c=e:GetHandler() if chk==0 then
local m=c:GetOriginalCode() if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local cm=_G["c"..m] cm.cos_g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if chk==0 then cm.cos_val={nil,num,num}
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then end
cm.cos_g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil) return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,num,nil)
cm.cos_val={nil,num,num}
end end
return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,num,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,num,num,nil)
return VgF.Sendto(LOCATION_DROP,g,REASON_COST+REASON_DISCARD)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,num,num,nil)
VgF.Sendto(LOCATION_GRAVE,g,REASON_COST+REASON_DISCARD)
return Duel.GetOperatedGroup():GetCount()
end end
---用于效果的Cost。它返回一个执行“【费用】[能量爆发num]”的函数。 ---用于效果的Cost。它返回一个执行“【费用】[能量爆发num]”的函数。
---@param num integer 能量爆发的数量 ---@param num integer 能量爆发的数量
---@return function 效果的Cost函数 ---@return function 效果的Cost函数
function VgF.EnergyCost(num) function VgF.EnergyCost(num)
return function (e,tp,eg,ep,ev,re,r,rp,chk) return function (e,tp,eg,ep,ev,re,r,rp,chk)
return VgF.EnergyCostOP(num,e,tp,eg,ep,ev,re,r,rp,chk) if VgF.GetValueType(num)~="number" then return 0 end
end local c=e:GetHandler()
end local m=c:GetOriginalCode()
function VgF.EnergyCostOP(num,e,tp,eg,ep,ev,re,r,rp,chk) local cm=_G["c"..m]
local c=e:GetHandler() if chk==0 then
local m=c:GetOriginalCode() if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local cm=_G["c"..m] cm.cos_g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730)
if chk==0 then cm.cos_val={nil,num,num}
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then end
cm.cos_g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730) return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EMBLEM,0,num,nil,10800730)
cm.cos_val={nil,num,num}
end end
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EMBLEM,0,num,nil,10800730) local sg=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730)
local g=VgF.GetCardsFromGroup(sg,num)
return VgF.Sendto(0,g,tp,POS_FACEUP,REASON_COST)
end end
local sg=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730)
local g=VgF.GetCardsFromGroup(sg,num)
VgF.Sendto(0,g,tp,POS_FACEUP,REASON_COST)
return Duel.GetOperatedGroup():GetCount()
end end
---用于效果的Cost。它返回一个执行“【费用】[灵魂爆发num]”的函数。 ---用于效果的Cost。它返回一个执行“【费用】[灵魂爆发num]”的函数。
---@param num integer 灵魂爆发的数量 ---@param num integer 灵魂爆发的数量
---@return function 效果的Cost函数 ---@return function 效果的Cost函数
function VgF.OverlayCost(num) function VgF.OverlayCost(num)
return function (e,tp,eg,ep,ev,re,r,rp,chk) return function (e,tp,eg,ep,ev,re,r,rp,chk)
return VgF.OverlayCostOP(num,e,tp,eg,ep,ev,re,r,rp,chk) if VgF.GetValueType(num)~="number" then return 0 end
end local c=e:GetHandler()
end local m=c:GetOriginalCode()
function VgF.OverlayCostOP(num,e,tp,eg,ep,ev,re,r,rp,chk) local cm=_G["c"..m]
local c=e:GetHandler() if chk==0 then
local m=c:GetOriginalCode() if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local cm=_G["c"..m] cm.cos_g=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup()
if chk==0 then cm.cos_val={nil,num,num}
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then end
cm.cos_g=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup() return Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayCount()>=num
cm.cos_val={nil,num,num}
end end
return Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayCount()>=num Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,nil,num,num,nil)
return VgF.Sendto(LOCATION_DROP,g,REASON_COST)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,nil,num,num,nil)
VgF.Sendto(LOCATION_GRAVE,g,REASON_COST)
return Duel.GetOperatedGroup():GetCount()
end end
---用于效果的Cost或Operation。它返回一个执行“【费用】[灵魂填充num]”的函数。 ---用于效果的Cost或Operation。它返回一个执行“【费用】[灵魂填充num]”的函数。
---@param num integer 灵魂填充的数量 ---@param num integer 灵魂填充的数量
---@return function 效果的Cost或Operation函数 ---@return function 效果的Cost或Operation函数
function VgF.OverlayFill(num) function VgF.OverlayFill(num)
return function (e,tp,eg,ep,ev,re,r,rp,chk) return function (e,tp,eg,ep,ev,re,r,rp,chk)
return VgF.OverlayFillOP(num,e,tp,eg,ep,ev,re,r,rp,chk) if VgF.GetValueType(num)~="number" then return 0 end
end local c=e:GetHandler()
end local m=c:GetOriginalCode()
function VgF.OverlayFillOP(num,e,tp,eg,ep,ev,re,r,rp,chk) local cm=_G["c"..m]
local c=e:GetHandler() if chk==0 then
local m=c:GetOriginalCode() if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local cm=_G["c"..m] cm.cos_g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if chk==0 then cm.cos_val={nil,num,num}
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then end
cm.cos_g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=num
cm.cos_val={nil,num,num}
end end
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=num local rc=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst()
local g=Duel.GetDecktopGroup(tp,num)
Duel.DisableShuffleCheck()
return VgF.Sendto(LOCATION_OVERLAY,g,rc)
end end
local rc=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst()
local g=Duel.GetDecktopGroup(tp,num)
Duel.DisableShuffleCheck()
VgF.Sendto(LOCATION_OVERLAY,g,rc)
return Duel.GetOperatedGroup():GetCount()
end end
---用于效果的Cost。它返回一个执行“【费用】[计数爆发num]”的函数。 ---用于效果的Cost。它返回一个执行“【费用】[计数爆发num]”的函数。
---@param num integer 计数爆发的数量 ---@param num integer 计数爆发的数量
---@return function 效果的Cost函数 ---@return function 效果的Cost函数
function VgF.DamageCost(num) function VgF.DamageCost(num)
return function (e,tp,eg,ep,ev,re,r,rp,chk) return function (e,tp,eg,ep,ev,re,r,rp,chk)
return VgF.DamageCostOP(num,e,tp,eg,ep,ev,re,r,rp,chk) if VgF.GetValueType(num)~="number" then return 0 end
end local c=e:GetHandler()
end local m=c:GetOriginalCode()
function VgF.DamageCostOP(num,e,tp,eg,ep,ev,re,r,rp,chk) local cm=_G["c"..m]
local c=e:GetHandler() if chk==0 then
local m=c:GetOriginalCode() if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local cm=_G["c"..m] cm.cos_g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_DAMAGE,0,nil)
if chk==0 then cm.cos_val={nil,num,num}
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then end
cm.cos_g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_DAMAGE,0,nil) return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_DAMAGE,0,num,nil)
cm.cos_val={nil,num,num}
end end
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_DAMAGE,0,num,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DAMAGE)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_DAMAGE,0,num,num,nil)
Duel.ChangePosition(g,POS_FACEDOWN_ATTACK)
return Duel.GetOperatedGroup():GetCount()
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DAMAGE)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_DAMAGE,0,num,num,nil)
Duel.ChangePosition(g,POS_FACEDOWN_ATTACK)
return Duel.GetOperatedGroup():GetCount()
end end
---用于效果的Operation。执行“从loc中选取int_min到int_max张满足f的卡,返回手牌。”。 ---用于效果的Operation。执行“从loc_from中选取最少int_min,最多int_max张满足f的卡,送去loc_to。”。
---@param loc integer 要选取的区域。不填则返回nil,而不是效果的Operation函数。 ---@param loc_to integer 要送去的区域。不填则返回0。
---@param loc_from integer 要选取的区域。不填则返回0。
---@param f function 卡片过滤的条件 ---@param f function 卡片过滤的条件
---@return function|nil 效果的Operation函数 function VgF.SearchCard(loc_to,loc_from,f,int_max,int_min)
function VgF.SearchCard(loc,f,int_max,int_min)
if not loc then return end
return function (e,tp,eg,ep,ev,re,r,rp) return function (e,tp,eg,ep,ev,re,r,rp)
VgF.SearchCardOP(loc,f,e,tp,eg,ep,ev,re,r,rp,int_max,int_min) if not loc_to or not loc_from then return 0 end
end if VgF.GetValueType(int_max)~="number" then int_max=1 end
end if VgF.GetValueType(int_min)~="number" then int_min=int_max end
function VgF.SearchCardOP(loc,f,e,tp,eg,ep,ev,re,r,rp,int_max,int_min) if loc_to==LOCATION_HAND then
if not loc then return end local g=VgF.SelectMatchingCard(HINTMSG_ATOHAND,e,tp,function (c)
if VgF.GetValueType(int_max)~="number" then int_max=1 end return VgF.GetValueType(f)~="function" or f(c)
if VgF.GetValueType(int_min)~="number" then int_min=int_max end end,tp,loc_from,0,int_min,int_max,nil)
local g=VgF.SelectMatchingCard(HINTMSG_ATOHAND,e,tp,function (c) if g:GetCount()>0 then
return VgF.GetValueType(f)~="function" or f(c) return VgF.Sendto(loc_to,g,nil,REASON_EFFECT)
end,tp,loc,0,int_min,int_max,nil) end
if g:GetCount()>0 then elseif loc_to==LOCATION_MZONE then
VgF.Sendto(LOCATION_HAND,g,nil,REASON_EFFECT) local g=VgF.SelectMatchingCard(HINTMSG_CALL,e,tp,function (c)
end return VgF.GetValueType(f)~="function" or f(c)
local sg=Duel.GetOperatedGroup() end,tp,loc_from,0,int_min,int_max,nil)
return sg:GetCount() if g:GetCount()>0 then
end return VgF.Sendto(loc_to,g,0,tp)
---用于效果的Operation。执行“从loc中选取int_min到int_max张满足f的卡,Call到R上。”。 end
---@param loc integer 要选取的区域。不填则返回nil,而不是效果的Operation函数。 elseif loc_to==LOCATION_DROP then
---@param f function 卡片过滤的条件 local g=VgF.SelectMatchingCard(HINTMSG_CALL,e,tp,function (c)
---@return function|nil 效果的Operation函数 return VgF.GetValueType(f)~="function" or f(c)
function VgF.SearchCardSpecialSummon(loc,f,int_max,int_min) end,tp,loc_from,0,int_min,int_max,nil)
if not loc then return end if g:GetCount()>0 then
return function (e,tp,eg,ep,ev,re,r,rp) return VgF.Sendto(loc_to,g,REASON_EFFECT)
VgF.SearchCardSpecialSummonOP(loc,f,e,tp,eg,ep,ev,re,r,rp,int_max,int_min) end
end elseif loc_to==LOCATION_REMOVED then
end local g=VgF.SelectMatchingCard(HINTMSG_CALL,e,tp,function (c)
function VgF.SearchCardSpecialSummonOP(loc,f,e,tp,eg,ep,ev,re,r,rp,int_max,int_min) return VgF.GetValueType(f)~="function" or f(c)
if not loc then return end end,tp,loc_from,0,int_min,int_max,nil)
if VgF.GetValueType(int_max)~="number" then int_max=1 end if g:GetCount()>0 then
if VgF.GetValueType(int_min)~="number" then int_min=int_max end return VgF.Sendto(loc_to,g,POS_FACEUP,REASON_EFFECT)
local g=VgF.SelectMatchingCard(HINTMSG_CALL,e,tp,function (c) end
return VgF.GetValueType(f)~="function" or f(c) elseif loc_to==LOCATION_EXILE then
end,tp,loc,0,1,1,nil) local g=VgF.SelectMatchingCard(HINTMSG_CALL,e,tp,function (c)
if g:GetCount()>0 then return VgF.GetValueType(f)~="function" or f(c)
VgF.Call(g,0,tp) end,tp,loc_from,0,int_min,int_max,nil)
if g:GetCount()>0 then
return VgF.Sendto(loc_to,g,REASON_EFFECT)
end
elseif loc_to==LOCATION_OVERLAY then
local g=VgF.SelectMatchingCard(HINTMSG_CALL,e,tp,function (c)
return VgF.GetValueType(f)~="function" or f(c)
end,tp,loc_from,0,int_min,int_max,nil)
if g:GetCount()>0 then
local rc=VgF.GetVMonster(tp)
return VgF.Sendto(loc_to,g,rc)
end
elseif loc_to|0xf800>0 then
local g=VgF.SelectMatchingCard(HINTMSG_CALL,e,tp,function (c)
return VgF.GetValueType(f)~="function" or f(c)
end,tp,loc_from,0,int_min,int_max,nil)
if g:GetCount()>0 then
return VgF.Sendto(loc_to,g,tp,POS_FACEUP_ATTACK,REASON_EFFECT)
end
end
return 0
end end
local sg=Duel.GetOperatedGroup()
return sg:GetCount()
end end
function Group.CheckSubGroup(g,f,min,max,...) function Group.CheckSubGroup(g,f,min,max,...)
min=min or 1 min=min or 1
...@@ -853,6 +853,10 @@ function VgF.SelectMatchingCard(hintmsg,e,select_tp,f,tp,loc_self,loc_op,int_min ...@@ -853,6 +853,10 @@ function VgF.SelectMatchingCard(hintmsg,e,select_tp,f,tp,loc_self,loc_op,int_min
if a then Duel.ShuffleDeck(select_tp) end if a then Duel.ShuffleDeck(select_tp) end
return g return g
end end
---用于效果的Operation。执行“从loc_from中选取最少int_min,最多int_max张满足f的卡,送去loc_to。”。
---@param loc integer 要送去的区域。不填则返回0。
---@param sg integer 要操作的卡|卡片组。
---@return number 具体操作的卡的数量
function VgF.Sendto(loc,sg,...) function VgF.Sendto(loc,sg,...)
local function AddOverlayGroup(g) local function AddOverlayGroup(g)
for tc in VgF.Next(g) do for tc in VgF.Next(g) do
...@@ -869,7 +873,7 @@ function VgF.Sendto(loc,sg,...) ...@@ -869,7 +873,7 @@ function VgF.Sendto(loc,sg,...)
g=Group.FromCards(sg) g=Group.FromCards(sg)
else return 0 else return 0
end end
if loc==LOCATION_GRAVE then if loc==LOCATION_DROP then
AddOverlayGroup(g) AddOverlayGroup(g)
return Duel.SendtoGrave(g,...) return Duel.SendtoGrave(g,...)
elseif loc==LOCATION_DECK then elseif loc==LOCATION_DECK then
...@@ -896,6 +900,7 @@ function VgF.Sendto(loc,sg,...) ...@@ -896,6 +900,7 @@ function VgF.Sendto(loc,sg,...)
local list={...} local list={...}
local c=list[1] local c=list[1]
Duel.Overlay(c,g) Duel.Overlay(c,g)
return g:GetCount()
elseif loc==LOCATION_TRIGGER then elseif loc==LOCATION_TRIGGER then
AddOverlayGroup(g) AddOverlayGroup(g)
local list={...} local list={...}
...@@ -903,9 +908,11 @@ function VgF.Sendto(loc,sg,...) ...@@ -903,9 +908,11 @@ function VgF.Sendto(loc,sg,...)
local target_tp=list[2] local target_tp=list[2]
local pos=list[3] local pos=list[3]
local enable=list[4] local enable=list[4]
local ct=0
for tc in VgF.Next(g) do for tc in VgF.Next(g) do
Duel.MoveToField(tc,move_tp,target_tp,loc,pos,enable) if Duel.MoveToField(tc,move_tp,target_tp,loc,pos,enable) then ct=ct+1 end
end end
return ct
elseif loc==LOCATION_MZONE then elseif loc==LOCATION_MZONE then
local list={...} local list={...}
local sumtype=list[1] local sumtype=list[1]
...@@ -923,7 +930,7 @@ function VgF.Sendto(loc,sg,...) ...@@ -923,7 +930,7 @@ function VgF.Sendto(loc,sg,...)
chk=list[5] chk=list[5]
end end
return VgF.Call(g,sumtype,tp,zone,pos,chk) return VgF.Call(g,sumtype,tp,zone,pos,chk)
elseif (loc|0xf800>0) then elseif loc|0xf800>0 then
AddOverlayGroup(g) AddOverlayGroup(g)
local list={...} local list={...}
local tp=list[1] local tp=list[1]
...@@ -931,8 +938,13 @@ function VgF.Sendto(loc,sg,...) ...@@ -931,8 +938,13 @@ function VgF.Sendto(loc,sg,...)
local reason=list[3] local reason=list[3]
if #list>=4 then if #list>=4 then
local seq=list[4] local seq=list[4]
return Duel.Sendto(g,tp,loc,pos,reason,seq) Duel.Sendto(g,tp,loc,pos,reason,seq)
local return_group=Duel.GetOperatedGroup()
return return_group:GetCount()
end end
return Duel.Sendto(g,tp,loc,pos,reason) Duel.Sendto(g,tp,loc,pos,reason)
local return_group=Duel.GetOperatedGroup()
return return_group:GetCount()
end end
return 0
end end
\ No newline at end of file
...@@ -10,6 +10,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -10,6 +10,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>=2 then if g:GetCount()>=2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
g=g:Select(tp,1,1,nil) g=g:Select(tp,1,1,nil)
vgf.Sendto(LOCATION_GRAVE,g,REASON_EFFECT+REASON_DISCARD) vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT+REASON_DISCARD)
end end
end end
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
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,vgf.SearchCardSpecialSummon(LOCATION_DROP,cm.filter),vgf.DisCardCost(1),nil,nil,1) vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,vgf.SearchCard(LOCATION_HAND,LOCATION_MZONE,LOCATION_DROP,cm.filter),vgf.DisCardCost(1),nil,nil,1)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation,vgf.DamageCost(1)) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation,vgf.DamageCost(1))
end end
function cm.filter(c) function cm.filter(c)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
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.BeRidedByCard(c,m,10101001,vgf.SearchCard(LOCATION_DECK,cm.filter),vgf.OverlayCost(1)) vgd.BeRidedByCard(c,m,10101001,vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.filter),vgf.OverlayCost(1))
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......
...@@ -2,15 +2,8 @@ ...@@ -2,15 +2,8 @@
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.BeRidedByCard(c,m,10101002,vgf.SearchCardSpecialSummon(LOCATION_DECK,cm.filter)) vgd.BeRidedByCard(c,m,10101002,vgf.SearchCard(LOCATION_HAND,LOCATION_MZONE,LOCATION_DECK,cm.filter))
local e1=Effect.CreateEffect(c) vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,2000,cm.con)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.con)
e1:SetValue(2000)
c:RegisterEffect(e1)
end end
function cm.filter(c) function cm.filter(c)
return c:IsCode(10101009) return c:IsCode(10101009)
......
...@@ -11,11 +11,11 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -11,11 +11,11 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
vgf.EffectReset(c,e1,EVENT_BATTLED) vgf.EffectReset(c,e1,EVENT_BATTLED)
if Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayCount()>=2 and Duel.SelectEffectYesNo(tp,vgf.stringid(VgID,10)) then if Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayCount()>=2 and Duel.SelectEffectYesNo(tp,vgf.stringid(VgID,10)) then
local cg=Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,2,2,nil) local cg=Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,2,2,nil)
if vgf.Sendto(LOCATION_GRAVE,cg,REASON_COST)==2 then if vgf.Sendto(LOCATION_DROP,cg,REASON_COST)==2 then
local g=vgf.SelectMatchingCard(HINTMSG_LEAVEONFIELD,e,tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil) local g=vgf.SelectMatchingCard(HINTMSG_LEAVEONFIELD,e,tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
if g then if g then
Duel.HintSelection(g) Duel.HintSelection(g)
vgf.Sendto(LOCATION_GRAVE,g,REASON_EFFECT) vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
end end
end end
end end
......
...@@ -9,7 +9,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -9,7 +9,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_ATKUP,e,tp,nil,tp,LOCATION_MZONE,0,1,1,nil) local g=vgf.SelectMatchingCard(HINTMSG_ATKUP,e,tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g) Duel.HintSelection(g)
vgf.AtkUp(c,g,5000,nil) vgf.AtkUp(c,g,5000,nil)
vgf.SearchCardOP(LOCATION_DROP,cm.filter,e,tp,eg,ep,ev,re,r,rp) vgf.SearchCard(LOCATION_HAND,LOCATION_DROP,cm.filter)(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.filter(c) function cm.filter(c)
return c:IsCode(10101006) return c:IsCode(10101006)
......
...@@ -23,5 +23,5 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,5 +23,5 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL)
local g=Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,1,1,nil) local g=Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,1,1,nil)
vgf.Sendto(LOCATION_MZONE,g,0,tp,0x4) vgf.Sendto(LOCATION_MZONE,g,0,tp,0x4)
vgf.OverlayFillOP(1,e,tp,eg,ep,ev,re,r,rp) vgf.OverlayFill(1)(e,tp,eg,ep,ev,re,r,rp)
end end
...@@ -7,7 +7,7 @@ end ...@@ -7,7 +7,7 @@ end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local num=1 local num=1
if Duel.GetFlagEffectLabel(tp,ConditionFlag)==10102001 then num=num+1 end if Duel.GetFlagEffectLabel(tp,ConditionFlag)==10102001 then num=num+1 end
vgf.OverlayFillOP(num,e,tp,eg,ep,ev,re,r,rp) vgf.OverlayFill(num)(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.con1(e,tp,eg,ep,ev,re,r,rp) function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return vgf.RMonsterCondition(e) and vgf.GetVMonster(tp):IsCode(10102001) return vgf.RMonsterCondition(e) and vgf.GetVMonster(tp):IsCode(10102001)
......
...@@ -18,7 +18,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,7 +18,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if tc:IsType(TYPE_MONSTER) then if tc:IsType(TYPE_MONSTER) then
vgf.Sendto(LOCATION_MZONE,g,0,tp) vgf.Sendto(LOCATION_MZONE,g,0,tp)
else else
vgf.Sendto(LOCATION_GRAVE,g,REASON_EFFECT) vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
end end
end end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp) function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -22,5 +22,5 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,5 +22,5 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ChangePosition(g1,POS_FACEDOWN) Duel.ChangePosition(g1,POS_FACEDOWN)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g2=Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,1,1,nil) local g2=Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,1,1,nil)
vgf.Sendto(LOCATION_GRAVE,g2,REASON_COST) vgf.Sendto(LOCATION_DROP,g2,REASON_COST)
end 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,vgf.SearchCard(LOCATION_HAND,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) 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) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
...@@ -27,5 +27,5 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,5 +27,5 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ChangePosition(g1,POS_FACEDOWN) Duel.ChangePosition(g1,POS_FACEDOWN)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g2=Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,1,1,nil) local g2=Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,1,1,nil)
vgf.Sendto(LOCATION_GRAVE,g2,REASON_COST) vgf.Sendto(LOCATION_DROP,g2,REASON_COST)
end end
\ No newline at end of file
...@@ -2,7 +2,7 @@ local cm,m,o=GetID() ...@@ -2,7 +2,7 @@ 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,2000,con)
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,5000,con,tg,c,EFFECT_UPDATE_DEFENSE,reset,LOCATION_GRAVE) vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,5000,con,tg,c,EFFECT_UPDATE_DEFENSE,reset,LOCATION_DROP)
end end
function cm.con(e,c) function cm.con(e,c)
local tp=e:GetHandler() local tp=e:GetHandler()
......
...@@ -26,7 +26,7 @@ function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,7 +26,7 @@ function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if sel==0 and a then if sel==0 and a then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g=Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,1,1,nil) local g=Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,1,1,nil)
vgf.Sendto(LOCATION_GRAVE,g,REASON_COST) vgf.Sendto(LOCATION_DROP,g,REASON_COST)
e:SetLabel(1) e:SetLabel(1)
else else
local g=vgf.SelectMatchingCard(HINTMSG_DAMAGE,e,tp,Card.IsFaceup,tp,LOCATION_DAMAGE,0,num,num,nil) local g=vgf.SelectMatchingCard(HINTMSG_DAMAGE,e,tp,Card.IsFaceup,tp,LOCATION_DAMAGE,0,num,num,nil)
...@@ -50,7 +50,7 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,7 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
if tc:IsType(TYPE_MONSTER) then if tc:IsType(TYPE_MONSTER) then
vgf.Sendto(LOCATION_MZONE,tc,0,tp) vgf.Sendto(LOCATION_MZONE,tc,0,tp)
else else
vgf.Sendto(LOCATION_GRAVE,tc,REASON_EFFECT) vgf.Sendto(LOCATION_DROP,tc,REASON_EFFECT)
end end
end end
end end
......
...@@ -46,7 +46,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -46,7 +46,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local sg=g:SelectSubGroup(tp,cm.check,true,4,4) local sg=g:SelectSubGroup(tp,cm.check,true,4,4)
vgf.Sendto(LOCATION_GRAVE,sg,REASON_EFFECT) vgf.Sendto(LOCATION_DROP,sg,REASON_EFFECT)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -12,7 +12,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -12,7 +12,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
vgf.OverlayFillOP(1,e,tp,eg,ep,ev,re,r,rp) vgf.OverlayFill(1)(e,tp,eg,ep,ev,re,r,rp)
if vgf.GetVMonster(tp):GetOverlayGroup():GetClassCount(Card.GetLevel)>=3 then if vgf.GetVMonster(tp):GetOverlayGroup():GetClassCount(Card.GetLevel)>=3 then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
......
...@@ -10,7 +10,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -10,7 +10,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_XMATERIAL,e,tp,nil,tp,LOCATION_GRAVE,0,1,1,nil) local g=vgf.SelectMatchingCard(HINTMSG_XMATERIAL,e,tp,nil,tp,LOCATION_DROP,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
vgf.Sendto(LOCATION_OVERLAY,g,vgf.GetVMonster(tp)) vgf.Sendto(LOCATION_OVERLAY,g,vgf.GetVMonster(tp))
end end
......
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.BeRidedByCard(c,m,cm.filter,vgf.SearchCard(LOCATION_DROP,cm.filter1),vgf.DamageCost(1)) vgd.BeRidedByCard(c,m,cm.filter,vgf.SearchCard(LOCATION_HAND,LOCATION_DROP,cm.filter1),vgf.DamageCost(1))
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_CUSTOM+EVENT_SUPPORT,cm.operation1,vgf.OverlayCost(1),cm.condition1) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_CUSTOM+EVENT_SUPPORT,cm.operation1,vgf.OverlayCost(1),cm.condition1)
end end
function cm.filter(c) function cm.filter(c)
......
...@@ -12,7 +12,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -12,7 +12,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g=Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,1,1,nil) local g=Duel.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():Select(tp,1,1,nil)
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
vgf.Sendto(LOCATION_GRAVE,g,REASON_COST) vgf.Sendto(LOCATION_DROP,g,REASON_COST)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,3) local g=Duel.GetDecktopGroup(tp,3)
......
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.SpellActivate(c,m,vgf.SearchCard(LOCATION_DECK,cm.filter),vgf.DamageCost(1),cm.condition) vgd.SpellActivate(c,m,vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.filter),vgf.DamageCost(1),cm.condition)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return vgf.GetVMonster(tp):IsSetCard(0x202) return vgf.GetVMonster(tp):IsSetCard(0x202)
......
...@@ -43,7 +43,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local szone=Duel.SelectField(tp,1,LOCATION_MZONE,0,zone) local szone=Duel.SelectField(tp,1,LOCATION_MZONE,0,zone)
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()
vgf.Sendto(LOCATION_GRAVE,tc,REASON_COST) vgf.Sendto(LOCATION_DROP,tc,REASON_COST)
end end
Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP_ATTACK,szone) Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP_ATTACK,szone)
if szone&0x11>0 then if szone&0x11>0 then
...@@ -56,7 +56,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
szone=Duel.SelectField(tp,1,LOCATION_MZONE,0,zone) szone=Duel.SelectField(tp,1,LOCATION_MZONE,0,zone)
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()
vgf.Sendto(LOCATION_GRAVE,tc,REASON_COST) vgf.Sendto(LOCATION_DROP,tc,REASON_COST)
end end
Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP_ATTACK,szone) Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP_ATTACK,szone)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
......
...@@ -15,7 +15,7 @@ end ...@@ -15,7 +15,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if vgf.GetAvailableLocation(tp)<=0 then return end if vgf.GetAvailableLocation(tp)<=0 then return end
local g=vgf.SelectMatchingCard(HINTMSG_Call,e,tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=vgf.SelectMatchingCard(HINTMSG_Call,e,tp,cm.filter,tp,LOCATION_DROP,0,1,1,nil)
Duel.HintSelection(g) Duel.HintSelection(g)
vgf.Sendto(LOCATION_MZONE,g,0,tp,nil,POS_FACEUP_DEFENSE) vgf.Sendto(LOCATION_MZONE,g,0,tp,nil,POS_FACEUP_DEFENSE)
end end
......
...@@ -24,6 +24,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,6 +24,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
vgf.Sendto(LOCATION_HAND,g,nil,REASON_EFFECT) vgf.Sendto(LOCATION_HAND,g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local tg=vgf.SelectMatchingCard(HINTMSG_DISCARD,e,tp,nil,tp,LOCATION_HAND,0,1,1,nil) local tg=vgf.SelectMatchingCard(HINTMSG_DISCARD,e,tp,nil,tp,LOCATION_HAND,0,1,1,nil)
vgf.Sendto(LOCATION_GRAVE,tg,REASON_COST) vgf.Sendto(LOCATION_DROP,tg,REASON_COST)
end end
end end
\ No newline at end of file
...@@ -22,8 +22,8 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,8 +22,8 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
return vgf.DamageCostOP(1,e,tp,eg,ep,ev,re,r,rp,chk) and vgf.DisCardCostOP(1,e,tp,eg,ep,ev,re,r,rp,chk) return vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) and vgf.DisCardCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
end end
vgf.DamageCostOP(1,e,tp,eg,ep,ev,re,r,rp,chk) vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
vgf.DisCardCostOP(1,e,tp,eg,ep,ev,re,r,rp,chk) vgf.DisCardCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
end end
\ No newline at end of file
...@@ -16,7 +16,7 @@ end ...@@ -16,7 +16,7 @@ end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_LEAVEONFIELD,e,tp,vgf.VMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil) local g=vgf.SelectMatchingCard(HINTMSG_LEAVEONFIELD,e,tp,vgf.VMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then vgf.Sendto(LOCATION_GRAVE,g,REASON_EFFECT) end if g:GetCount()>0 then vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT) end
vgf.AtkUp(c,c,10000) vgf.AtkUp(c,c,10000)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -23,6 +23,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,6 +23,6 @@ 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) local g=vgf.SelectMatchingCard(HINTMSG_LEAVEONFIELD,e,tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
if g then if g then
Duel.HintSelection(g) Duel.HintSelection(g)
vgf.Sendto(LOCATION_GRAVE,g,REASON_EFFECT) vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -13,8 +13,8 @@ end ...@@ -13,8 +13,8 @@ end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
return vgf.OverlayCostOP(1,e,tp,eg,ep,ev,re,r,rp,chk) return vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
end end
vgf.OverlayCostOP(1,e,tp,eg,ep,ev,re,r,rp,chk) vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
vgf.Sendto(LOCATION_GRAVE,c,REASON_COST) vgf.Sendto(LOCATION_DROP,c,REASON_COST)
end end
\ No newline at end of file
...@@ -12,7 +12,7 @@ end ...@@ -12,7 +12,7 @@ end
--效果二处理 --效果二处理
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
vgf.SearchCardSpecialSummonOP(LOCATION_DROP,cm.fliter2,e,tp,eg,ep,ev,re,r,rp) vgf.SearchCard(LOCATION_MZONE,LOCATION_DROP,cm.fliter2)(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
vgf.AtkUp(c,g,5000) vgf.AtkUp(c,g,5000)
end end
...@@ -22,7 +22,7 @@ function cm.fliter2(c) ...@@ -22,7 +22,7 @@ function cm.fliter2(c)
end end
--计数爆发1,灵魂爆发1 --计数爆发1,灵魂爆发1
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.DamageCostOP(1,e,tp,eg,ep,ev,re,r,rp,0) and vgf.OverlayCostOP(1,e,tp,eg,ep,ev,re,r,rp,0) end 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.DamageCostOP(1,e,tp,eg,ep,ev,re,r,rp,1) vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,1)
vgf.OverlayCostOP(1,e,tp,eg,ep,ev,re,r,rp,1) vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,1)
end end
...@@ -17,7 +17,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMatchingGroupCount(nil,tp,LOCATION_DAMAGE,0,nil)>=Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_DAMAGE,nil) then if Duel.GetMatchingGroupCount(nil,tp,LOCATION_DAMAGE,0,nil)>=Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_DAMAGE,nil) then
local tc=vgf.SelectMatchingCard(HINTMSG_TODROP,e,tp,nil,tp,LOCATION_DAMAGE,0,1,1,nil):GetFirst() local tc=vgf.SelectMatchingCard(HINTMSG_TODROP,e,tp,nil,tp,LOCATION_DAMAGE,0,1,1,nil):GetFirst()
if tc then if tc then
vgf.Sendto(LOCATION_GRAVE,tc,REASON_TRIGGER) vgf.Sendto(LOCATION_DROP,tc,REASON_TRIGGER)
end end
end end
end end
\ No newline at end of file
...@@ -10,14 +10,14 @@ function cm.initial_effect(c) ...@@ -10,14 +10,14 @@ function cm.initial_effect(c)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
local g=vgf.SelectMatchingCard(HINTMSG_XMATERIAL,e,tp,nil,tp,LOCATION_GRAVE,0,0,1,nil) local g=vgf.SelectMatchingCard(HINTMSG_XMATERIAL,e,tp,nil,tp,LOCATION_DROP,0,0,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
vgf.Sendto(LOCATION_OVERLAY,g,vgf.GetVMonster(tp)) vgf.Sendto(LOCATION_OVERLAY,g,vgf.GetVMonster(tp))
end end
end end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp) function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
vgf.OverlayFillOP(1,e,tp,eg,ep,ev,re,r,rp,1) vgf.OverlayFill(1)(e,tp,eg,ep,ev,re,r,rp,1)
local e1=vgf.AtkUp(c,c,5000) local e1=vgf.AtkUp(c,c,5000)
vgf.EffectReset(c,e1,EVENT_BATTLED) vgf.EffectReset(c,e1,EVENT_BATTLED)
end end
......
...@@ -12,9 +12,9 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -12,9 +12,9 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
vgf.OverlayFillOP(1,e,tp,eg,ep,ev,re,r,rp) vgf.OverlayFill(1)(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) local g=vgf.SelectMatchingCard(HINTMSG_LEAVEONFIELD,e,tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
vgf.Sendto(LOCATION_GRAVE,g,REASON_EFFECT) vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
end end
end end
...@@ -7,9 +7,9 @@ function cm.initial_effect(c) ...@@ -7,9 +7,9 @@ function cm.initial_effect(c)
end end
--计数爆发1,灵魂爆发1 --计数爆发1,灵魂爆发1
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.DamageCostOP(1,e,tp,eg,ep,ev,re,r,rp,0) and vgf.OverlayCostOP(1,e,tp,eg,ep,ev,re,r,rp,0) end 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.DamageCostOP(1,e,tp,eg,ep,ev,re,r,rp,1) vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,1)
vgf.OverlayCostOP(1,e,tp,eg,ep,ev,re,r,rp,1) vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,1)
end end
--选择对手的1张等级2以上的后防者 --选择对手的1张等级2以上的后防者
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
...@@ -20,7 +20,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,7 +20,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_LEAVEONFIELD,e,tp,cm.fliter,tp,0,LOCATION_MZONE,1,1,nil) local g=vgf.SelectMatchingCard(HINTMSG_LEAVEONFIELD,e,tp,cm.fliter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
vgf.Sendto(LOCATION_GRAVE,g,REASON_EFFECT) vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
end end
end end
function cm.fliter(c) function cm.fliter(c)
......
...@@ -26,6 +26,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,6 +26,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if sg:GetCount()>=2 then if sg:GetCount()>=2 then
sg=sg:Select(tp,1,1,nil) sg=sg:Select(tp,1,1,nil)
vgf.Sendto(LOCATION_GRAVE,sg,REASON_DISCARD+REASON_EFFECT) vgf.Sendto(LOCATION_DROP,sg,REASON_DISCARD+REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -11,7 +11,7 @@ end ...@@ -11,7 +11,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
vgf.OverlayFillOP(1,e,tp,eg,ep,ev,re,r,rp,1) vgf.OverlayFill(1)(e,tp,eg,ep,ev,re,r,rp,1)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_HAND,nil)>=1 end
...@@ -25,5 +25,5 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,5 +25,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)) return not(c:IsSummonType(SUMMON_TYPE_RIDE) or c:IsSummonType(SUMMON_TYPE_SELFRIDE))
end end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp) function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
vgf.OverlayFillOP(2,e,tp,eg,ep,ev,re,r,rp,1) vgf.OverlayFill(2)(e,tp,eg,ep,ev,re,r,rp,1)
end end
\ No newline at end of file
...@@ -25,6 +25,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,6 +25,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if sg:GetCount()>=2 then if sg:GetCount()>=2 then
sg=sg:Select(tp,1,1,nil) sg=sg:Select(tp,1,1,nil)
vgf.Sendto(LOCATION_GRAVE,sg,REASON_DISCARD+REASON_EFFECT) vgf.Sendto(LOCATION_DROP,sg,REASON_DISCARD+REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
vgf.OverlayFillOP(1,e,tp,eg,ep,ev,re,r,rp,1) vgf.OverlayFill(1)(e,tp,eg,ep,ev,re,r,rp,1)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKUP)
local e1=Duel.GetMatchingGroupCount(nil,tp,LOCATION_OVERLAY,0,nil)/5 local e1=Duel.GetMatchingGroupCount(nil,tp,LOCATION_OVERLAY,0,nil)/5
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
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),vgf.DamageCost(1),cm.con2) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.filter),vgf.DamageCost(1),cm.con2)
-- 【自】【V】:这个单位的攻击击中时,抽1张卡,选择你的1张含有「诚意真心」的后防者,这个回合中,力量+5000。 -- 【自】【V】:这个单位的攻击击中时,抽1张卡,选择你的1张含有「诚意真心」的后防者,这个回合中,力量+5000。
vgd.EffectTypeTriggerWhenHitting(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,cm.operation1,nil,vgf.VMonsterCondition) vgd.EffectTypeTriggerWhenHitting(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,cm.operation1,nil,vgf.VMonsterCondition)
end end
......
...@@ -13,7 +13,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -13,7 +13,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local e1=vgf.AtkUp(c,c,5000,nil) local e1=vgf.AtkUp(c,c,5000,nil)
vgf.EffectReset(c,e1,EVENT_BATTLED) vgf.EffectReset(c,e1,EVENT_BATTLED)
if vgf.IsSequence(c,2) then if vgf.IsSequence(c,2) then
vgf.DamageFillOP(1,e,tp,eg,ep,ev,re,r,rp) vgf.DamageFill(1)(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.checkfilter(c,tp,re) function cm.checkfilter(c,tp,re)
......
...@@ -10,7 +10,7 @@ end ...@@ -10,7 +10,7 @@ end
--效果一处理 --效果一处理
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
vgf.SearchCardOP(LOCATION_DECK,cm.fliter,e,tp,eg,ep,ev,re,r,rp) vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.fliter)(e,tp,eg,ep,ev,re,r,rp)
vgf.AtkUp(c,c,10000,nil) vgf.AtkUp(c,c,10000,nil)
end end
--返回效果一寻找卡密 --返回效果一寻找卡密
...@@ -28,7 +28,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function cm.operation2(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) local g=vgf.SelectMatchingCard(HINTMSG_LEAVEONFIELD,e,tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
if g then if g then
Duel.HintSelection(g) Duel.HintSelection(g)
vgf.Sendto(LOCATION_GRAVE,g,REASON_EFFECT) vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
end end
vgf.AtkUp(c,c,5000) vgf.AtkUp(c,c,5000)
vgf.StarUp(c,c,1) vgf.StarUp(c,c,1)
......
...@@ -10,7 +10,7 @@ end ...@@ -10,7 +10,7 @@ end
--效果一处理 --效果一处理
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
vgf.SearchCardOP(LOCATION_DECK,cm.fliter,e,tp,eg,ep,ev,re,r,rp) vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.fliter)(e,tp,eg,ep,ev,re,r,rp)
vgf.AtkUp(c,c,10000,nil) vgf.AtkUp(c,c,10000,nil)
end end
--返回效果一寻找目标 --返回效果一寻找目标
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
--效果二处理 --效果二处理
function cm.operation2(e,tp,eg,ep,ev,re,r,rp) function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
vgf.SearchCardSpecialSummonOP(LOCATION_DROP,cm.fliter2,e,tp,eg,ep,ev,re,r,rp) vgf.SearchCard(LOCATION_MZONE,LOCATION_DROP,cm.fliter2)(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
vgf.AtkUp(c,g,10000) vgf.AtkUp(c,g,10000)
end end
......
...@@ -10,7 +10,7 @@ end ...@@ -10,7 +10,7 @@ end
--效果一处理 --效果一处理
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
vgf.SearchCardOP(LOCATION_DECK,cm.fliter,e,tp,eg,ep,ev,re,r,rp) vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.fliter)(e,tp,eg,ep,ev,re,r,rp)
vgf.AtkUp(c,c,10000,nil) vgf.AtkUp(c,c,10000,nil)
end end
--返回找的卡密 --返回找的卡密
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
--效果二处理 --效果二处理
function cm.operation2(e,tp,eg,ep,ev,re,r,rp) function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
vgf.SearchCardSpecialSummonOP(LOCATION_HAND,cm.fliter2,e,tp,eg,ep,ev,re,r,rp) vgf.SearchCard(LOCATION_MZONE,LOCATION_HAND,cm.fliter2)(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
vgf.AtkUp(c,g,10000) vgf.AtkUp(c,g,10000)
end end
......
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