Commit cb12d359 authored by xiaoye's avatar xiaoye

fix CardsFromTo

parent 8ec1f16b
...@@ -159,7 +159,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -159,7 +159,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_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)
vgf.AtkUp(c,g,5000,nil) vgf.AtkUp(c,g,5000,nil)
vgf.SearchCard(LOCATION_HAND,LOCATION_DROP,cm.filter)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,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)
...@@ -184,7 +184,7 @@ vgd.BeRidedByCard(c, m[, code, op, cost, con, tg]) ...@@ -184,7 +184,7 @@ vgd.BeRidedByCard(c, m[, code, op, cost, con, tg])
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.SearchCard(LOCATION_MZONE,LOCATION_DECK,cm.filter)) vgd.BeRidedByCard(c,m,10101002,vgf.CardsFromTo(REASON_EFFECT,LOCATION_MZONE,LOCATION_DECK,cm.filter))
end end
function cm.filter(c) function cm.filter(c)
return c:IsCode(10101009) return c:IsCode(10101009)
...@@ -306,7 +306,7 @@ VgD.EffectTypeIgnition(c, m[, loc, op, cost, con, tg, count, property]) ...@@ -306,7 +306,7 @@ VgD.EffectTypeIgnition(c, m[, loc, op, cost, con, tg, count, property])
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.SearchCard(LOCATION_HAND,LOCATION_MZONE,LOCATION_DROP,cm.filter),vgf.DisCardCost(1),nil,nil,1) vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_MZONE,LOCATION_DROP,cm.filter),vgf.DisCardCost(1),nil,nil,1)
end end
function cm.filter(c) function cm.filter(c)
return c:IsLevel(0) return c:IsLevel(0)
...@@ -420,12 +420,14 @@ vgf.VgCard(c) ...@@ -420,12 +420,14 @@ vgf.VgCard(c)
## 2.用于行为的封装函数(仅用于operation函数):从X1处寻找卡送去X2处 ## 2.用于行为的封装函数(仅用于operation函数):从X1处寻找卡送去X2处
```lua ```lua
vgf.SearchCard(loc_to, loc_from, f[, int_max, int_min, ...]) vgf.CardsFromTo(reason ,loc_to, loc_from, f[, int_max, int_min, ...])
``` ```
返回值:int 【具体操作的数量】 返回值:int 【具体操作的数量】
参数注释 参数注释
> **reason : 操作的原因**
>
> **loc_to : 找到的卡送去某处** > **loc_to : 找到的卡送去某处**
> >
> **loc_from : 从某处找卡** > **loc_from : 从某处找卡**
......
...@@ -741,7 +741,7 @@ end ...@@ -741,7 +741,7 @@ end
---@param loc_to number 要送去的区域。不填则返回0。 ---@param loc_to number 要送去的区域。不填则返回0。
---@param loc_from number 要选取的区域。不填则返回0。 ---@param loc_from number 要选取的区域。不填则返回0。
---@param f function|nil 卡片过滤的条件 ---@param f function|nil 卡片过滤的条件
function VgF.SearchCard(loc_to, loc_from, f, int_max, int_min, ...) function VgF.CardsFromTo(reason ,loc_to, loc_from, f, int_max, int_min, ...)
local ext_params = {...} local ext_params = {...}
return function (e, tp, eg, ep, ev, re, r, rp) return function (e, tp, eg, ep, ev, re, r, rp)
if not loc_to or not loc_from then return 0 end if not loc_to or not loc_from then return 0 end
...@@ -753,7 +753,7 @@ function VgF.SearchCard(loc_to, loc_from, f, int_max, int_min, ...) ...@@ -753,7 +753,7 @@ function VgF.SearchCard(loc_to, loc_from, f, int_max, int_min, ...)
return VgF.GetValueType(f) ~= "function" or f(c, table.unpack(ext_params)) return VgF.GetValueType(f) ~= "function" or f(c, table.unpack(ext_params))
end, tp, loc_from, 0, int_min, int_max, nil) end, tp, loc_from, 0, int_min, int_max, nil)
if g:GetCount() > 0 then if g:GetCount() > 0 then
return VgF.Sendto(loc_to, g, nil, REASON_EFFECT) return VgF.Sendto(loc_to, g, nil, reason)
end end
elseif loc_to == LOCATION_VZONE then elseif loc_to == LOCATION_VZONE then
local g = VgF.SelectMatchingCard(HINTMSG_CALL, e, tp, function (c) local g = VgF.SelectMatchingCard(HINTMSG_CALL, e, tp, function (c)
...@@ -779,21 +779,21 @@ function VgF.SearchCard(loc_to, loc_from, f, int_max, int_min, ...) ...@@ -779,21 +779,21 @@ function VgF.SearchCard(loc_to, loc_from, f, int_max, int_min, ...)
return VgF.GetValueType(f) ~= "function" or f(c, table.unpack(ext_params)) return VgF.GetValueType(f) ~= "function" or f(c, table.unpack(ext_params))
end, tp, loc_from, 0, int_min, int_max, nil) end, tp, loc_from, 0, int_min, int_max, nil)
if g:GetCount() > 0 then if g:GetCount() > 0 then
return VgF.Sendto(loc_to, g, REASON_EFFECT) return VgF.Sendto(loc_to, g, reason)
end end
elseif loc_to == LOCATION_REMOVED then elseif loc_to == LOCATION_REMOVED then
local g = VgF.SelectMatchingCard(HINTMSG_CALL, e, tp, function (c) local g = VgF.SelectMatchingCard(HINTMSG_CALL, e, tp, function (c)
return VgF.GetValueType(f) ~= "function" or f(c, table.unpack(ext_params)) return VgF.GetValueType(f) ~= "function" or f(c, table.unpack(ext_params))
end, tp, loc_from, 0, int_min, int_max, nil) end, tp, loc_from, 0, int_min, int_max, nil)
if g:GetCount() > 0 then if g:GetCount() > 0 then
return VgF.Sendto(loc_to, g, POS_FACEUP, REASON_EFFECT) return VgF.Sendto(loc_to, g, POS_FACEUP, reason)
end end
elseif loc_to == LOCATION_EXILE then elseif loc_to == LOCATION_EXILE then
local g = VgF.SelectMatchingCard(HINTMSG_CALL, e, tp, function (c) local g = VgF.SelectMatchingCard(HINTMSG_CALL, e, tp, function (c)
return VgF.GetValueType(f) ~= "function" or f(c, table.unpack(ext_params)) return VgF.GetValueType(f) ~= "function" or f(c, table.unpack(ext_params))
end, tp, loc_from, 0, int_min, int_max, nil) end, tp, loc_from, 0, int_min, int_max, nil)
if g:GetCount() > 0 then if g:GetCount() > 0 then
return VgF.Sendto(loc_to, g, REASON_EFFECT) return VgF.Sendto(loc_to, g, reason)
end end
elseif loc_to == LOCATION_OVERLAY then elseif loc_to == LOCATION_OVERLAY then
local g = VgF.SelectMatchingCard(HINTMSG_CALL, e, tp, function (c) local g = VgF.SelectMatchingCard(HINTMSG_CALL, e, tp, function (c)
...@@ -808,7 +808,7 @@ function VgF.SearchCard(loc_to, loc_from, f, int_max, int_min, ...) ...@@ -808,7 +808,7 @@ function VgF.SearchCard(loc_to, loc_from, f, int_max, int_min, ...)
return VgF.GetValueType(f) ~= "function" or f(c, table.unpack(ext_params)) return VgF.GetValueType(f) ~= "function" or f(c, table.unpack(ext_params))
end, tp, loc_from, 0, int_min, int_max, nil) end, tp, loc_from, 0, int_min, int_max, nil)
if g:GetCount() > 0 then if g:GetCount() > 0 then
return VgF.Sendto(loc_to, g, tp, POS_FACEUP_ATTACK, REASON_EFFECT) return VgF.Sendto(loc_to, g, tp, POS_FACEUP_ATTACK, reason)
end end
end end
return 0 return 0
......
...@@ -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)
vgd.VgCard(c) vgd.VgCard(c)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,vgf.SearchCard(LOCATION_MZONE,LOCATION_DROP,cm.filter),vgf.DisCardCost(1),vgf.VMonsterCondition,nil,1) vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,vgf.CardsFromTo(REASON_EFFECT,LOCATION_MZONE,LOCATION_DROP,cm.filter),vgf.DisCardCost(1),vgf.VMonsterCondition,nil,1)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation,vgf.DamageCost(1),vgf.VMonsterCondition) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation,vgf.DamageCost(1),vgf.VMonsterCondition)
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)
vgd.VgCard(c) vgd.VgCard(c)
vgd.BeRidedByCard(c,m,10101001,vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.filter),vgf.OverlayCost(1)) vgd.BeRidedByCard(c,m,10101001,vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DECK,cm.filter),vgf.OverlayCost(1))
vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,2000,cm.con) vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,2000,cm.con)
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)
vgd.VgCard(c) vgd.VgCard(c)
vgd.BeRidedByCard(c,m,10101002,vgf.SearchCard(LOCATION_MZONE,LOCATION_DECK,cm.filter)) vgd.BeRidedByCard(c,m,10101002,vgf.CardsFromTo(REASON_EFFECT,LOCATION_MZONE,LOCATION_DECK,cm.filter))
vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,2000,cm.con) vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,2000,cm.con)
end end
function cm.filter(c) function cm.filter(c)
......
...@@ -8,7 +8,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -8,7 +8,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_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)
vgf.AtkUp(c,g,5000,nil) vgf.AtkUp(c,g,5000,nil)
vgf.SearchCard(LOCATION_HAND,LOCATION_DROP,cm.filter)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,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)
......
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgd.VgCard(c) vgd.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.filter),nil,vgf.VSummonCondition) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DECK,cm.filter),nil,vgf.VSummonCondition)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.operation1,cm.cost,cm.condition) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.operation1,cm.cost,cm.condition)
end end
function cm.filter(c) function cm.filter(c)
......
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgd.VgCard(c) vgd.VgCard(c)
vgd.BeRidedByCard(c,m,cm.filter,vgf.SearchCard(LOCATION_HAND,LOCATION_DROP,cm.filter1),vgf.DamageCost(1)) vgd.BeRidedByCard(c,m,cm.filter,vgf.CardsFromTo(REASON_EFFECT,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)
......
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgd.VgCard(c) vgd.VgCard(c)
vgd.SpellActivate(c,m,vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.filter),vgf.DamageCost(1),cm.condition) vgd.SpellActivate(c,m,vgf.CardsFromTo(REASON_EFFECT,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)
......
...@@ -13,5 +13,5 @@ function cm.initial_effect(c) ...@@ -13,5 +13,5 @@ function cm.initial_effect(c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(AFFECT_CODE_MIX_DIFFERENT_NAME) e2:SetCode(AFFECT_CODE_MIX_DIFFERENT_NAME)
c:RegisterEffect(e2) c:RegisterEffect(e2)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,vgf.SearchCard(LOCATION_MZONE,LOCATION_DROP),vgf.DamageCost(1),vgf.VMonsterCondition,nil,1) vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,vgf.CardsFromTo(REASON_EFFECT,LOCATION_MZONE,LOCATION_DROP),vgf.DamageCost(1),vgf.VMonsterCondition,nil,1)
end end
\ No newline at end of file
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local code=vgf.GetVMonster(tp):GetCode() local code=vgf.GetVMonster(tp):GetCode()
vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.filter,1,0,code) vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DECK,cm.filter,1,0,code)
end end
function cm.filter(c,code) function cm.filter(c,code)
return c:IsCode(code) return c:IsCode(code)
......
...@@ -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.SearchCard(LOCATION_MZONE,LOCATION_DROP,cm.filter2)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,LOCATION_MZONE,LOCATION_DROP,cm.filter2)(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
......
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgd.VgCard(c) vgd.VgCard(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.SearchCard(LOCATION_HAND,LOCATION_DROP,cm.filter,1,0),nil,vgf.VSummonCondition) vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DROP,cm.filter,1,0),nil,vgf.VSummonCondition)
vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,5000,cm.con2) vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,5000,cm.con2)
vgd.GlobalCheckEffect(c,m,EVENT_CHAINING,cm.checkcon) vgd.GlobalCheckEffect(c,m,EVENT_CHAINING,cm.checkcon)
end end
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp,chk) function cm.op(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
vgf.SearchCard(LOCATION_MZONE,LOCATION_GRAVE,cm.filter,1,1)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,LOCATION_MZONE,LOCATION_GRAVE,cm.filter,1,1)(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
......
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgd.VgCard(c) vgd.VgCard(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,Card.IsSetCard,1,0,0x5040),nil,vgf.VSummonCondition) vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DECK,Card.IsSetCard,1,0,0x5040),nil,vgf.VSummonCondition)
vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,2000,cm.con) vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,2000,cm.con)
end end
function cm.filter(c) function cm.filter(c)
......
...@@ -12,8 +12,8 @@ end ...@@ -12,8 +12,8 @@ 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,2,REASON_EFFECT) Duel.Draw(tp,2,REASON_EFFECT)
if vgf.SearchCard(LOCATION_HAND,LOCATION_DROP,cm.filter,1,0)(e,tp,eg,ep,ev,re,r,rp)==0 then if vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DROP,cm.filter,1,0)(e,tp,eg,ep,ev,re,r,rp)==0 then
vgf.SearchCard(LOCATION_HAND,LOCATION_DROP,nil,2,2)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DROP,nil,2,2)(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.filter(c) function cm.filter(c)
......
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgd.VgCard(c) vgd.VgCard(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.SearchCard(LOCATION_MZONE,LOCATION_OVERLAY,Card.IsSetCard,1,1,0x78),nil,vgf.VSummonCondition) vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.CardsFromTo(REASON_EFFECT,LOCATION_MZONE,LOCATION_OVERLAY,Card.IsSetCard,1,1,0x78),nil,vgf.VSummonCondition)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op,cm.cost,nil,nil,1) vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op,cm.cost,nil,nil,1)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -8,7 +8,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -8,7 +8,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT) vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
Duel.BreakEffect() Duel.BreakEffect()
if vgf.GetVMonster(tp):IsCode(10101001) then if vgf.GetVMonster(tp):IsCode(10101001) then
vgf.SearchCard(LOCATION_MZONE,LOCATION_GRAVE,Card.IsLevel,1,0,0)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,LOCATION_MZONE,LOCATION_GRAVE,Card.IsLevel,1,0,0)(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.filter(c) function cm.filter(c)
......
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgd.VgCard(c) vgd.VgCard(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.SearchCard(LOCATION_MZONE,LOCATION_DROP,cm.filter),vgf.DamageCost(1),vgf.RSummonCondition) vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.CardsFromTo(REASON_EFFECT,LOCATION_MZONE,LOCATION_DROP,cm.filter),vgf.DamageCost(1),vgf.RSummonCondition)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.op,vgf.DamageCost(1),vgf.RMonsterCondition) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.op,vgf.DamageCost(1),vgf.RMonsterCondition)
end end
function cm.filter(c) function cm.filter(c)
......
...@@ -8,5 +8,5 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -8,5 +8,5 @@ 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 return vgf.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return vgf.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) end
vgf.SearchCard(LOCATION_OVERLAY,LOCATION_HAND,nil,1) vgf.CardsFromTo(REASON_EFFECT,LOCATION_OVERLAY,LOCATION_HAND,nil,1)
end end
\ No newline at end of file
...@@ -6,6 +6,6 @@ end ...@@ -6,6 +6,6 @@ end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
vgf.OverlayFill(3)(e,tp,eg,ep,ev,re,r,rp) vgf.OverlayFill(3)(e,tp,eg,ep,ev,re,r,rp)
if vgf.GetVMonster(tp):GetOverlayCount()>=10 then if vgf.GetVMonster(tp):GetOverlayCount()>=10 then
vgf.SearchCard(LOCATION_HAND,LOCATION_OVERLAY,nil,1)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_OVERLAY,nil,1)(e,tp,eg,ep,ev,re,r,rp)
end end
end end
\ No newline at end of file
...@@ -6,7 +6,7 @@ end ...@@ -6,7 +6,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()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
vgf.SearchCard(LOCATION_MZONE,LOCATION_HAND,vgf.IsCanBeCalled,1,1,e,tp) vgf.CardsFromTo(REASON_EFFECT,LOCATION_MZONE,LOCATION_HAND,vgf.IsCanBeCalled,1,1,e,tp)
local ct=Duel.GetFlagEffectLabel(tp,FLAG_CONDITION) local ct=Duel.GetFlagEffectLabel(tp,FLAG_CONDITION)
if VgF.GetValueType(ct)=="number" and ct==10102001 then if VgF.GetValueType(ct)=="number" and ct==10102001 then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -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)--这个函数下面用于注册效果
vgd.VgCard(c) vgd.VgCard(c)
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) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.CardsFromTo(REASON_EFFECT,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
......
...@@ -12,7 +12,7 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp) ...@@ -12,7 +12,7 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
VgF.SearchCard(LOCATION_HAND,LOCATION_MZONE,cm.filter,0,1)(e,tp,eg,ep,ev,re,r,rp) VgF.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_MZONE,cm.filter,0,1)(e,tp,eg,ep,ev,re,r,rp)
-- local g = vgf.SelectMatchingCard(HINTMSG_ATOHAND,e,tp,cm.filter,tp,LOCATION_MZONE,0,0,1,nil) -- local g = vgf.SelectMatchingCard(HINTMSG_ATOHAND,e,tp,cm.filter,tp,LOCATION_MZONE,0,0,1,nil)
-- vgf.Sendto(LOCATION_HAND,g) -- vgf.Sendto(LOCATION_HAND,g)
end end
......
...@@ -9,7 +9,7 @@ function cm.initial_effect(c) ...@@ -9,7 +9,7 @@ function cm.initial_effect(c)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
VgF.SearchCard(LOCATION_HAND,LOCATION_GRAVE,cm.filter,1,0)(e,tp,eg,ep,ev,re,r,rp) VgF.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_GRAVE,cm.filter,1,0)(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.con(e) function cm.con(e)
......
...@@ -14,5 +14,5 @@ end ...@@ -14,5 +14,5 @@ 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()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
VgF.SearchCard(LOCATION_GRAVE,LOCATION_HAND,nil,1,1)(e,tp,eg,ep,ev,re,r,rp) VgF.CardsFromTo(REASON_EFFECT,LOCATION_GRAVE,LOCATION_HAND,nil,1,1)(e,tp,eg,ep,ev,re,r,rp)
end end
\ No newline at end of file
...@@ -3,7 +3,7 @@ local cm,m,o=GetID() ...@@ -3,7 +3,7 @@ local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgd.VgCard(c) vgd.VgCard(c)
-- 【自】:这个单位被RIDE时,通过【费用】[将手牌中的1张卡放置到灵魂里],从你的牌堆里探寻至多1张宝石卡,公开后加入手牌,然后牌堆洗切。 -- 【自】:这个单位被RIDE时,通过【费用】[将手牌中的1张卡放置到灵魂里],从你的牌堆里探寻至多1张宝石卡,公开后加入手牌,然后牌堆洗切。
vgd.BeRidedByCard(c,m,nil,vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.filter,1,0),cm.cost1) vgd.BeRidedByCard(c,m,nil,vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DECK,cm.filter,1,0),cm.cost1)
-- 【自】【R】:你施放指令卡时,通过【费用】[灵魂爆发1],这个回合中,这个单位的力量+5000。 -- 【自】【R】:你施放指令卡时,通过【费用】[灵魂爆发1],这个回合中,这个单位的力量+5000。
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_CHAINING,cm.op,VgF.OverlayCost(1),cm.con) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_CHAINING,cm.op,VgF.OverlayCost(1),cm.con)
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.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.filter)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DECK,cm.filter)(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
vgf.AtkUp(c,c,10000,nil) vgf.AtkUp(c,c,10000,nil)
end end
......
...@@ -6,7 +6,7 @@ function cm.initial_effect(c) ...@@ -6,7 +6,7 @@ function cm.initial_effect(c)
end 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()
vgf.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.filter,1,0)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DECK,cm.filter,1,0)(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
vgf.AtkUp(c,c,10000) vgf.AtkUp(c,c,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.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.filter)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DECK,cm.filter)(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
vgf.AtkUp(c,c,10000,nil) vgf.AtkUp(c,c,10000,nil)
end end
...@@ -27,7 +27,7 @@ end ...@@ -27,7 +27,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.SearchCard(LOCATION_MZONE,LOCATION_DROP,cm.filter2)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,LOCATION_MZONE,LOCATION_DROP,cm.filter2)(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.SearchCard(LOCATION_HAND,LOCATION_DECK,cm.filter)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DECK,cm.filter)(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
vgf.AtkUp(c,c,10000,nil) vgf.AtkUp(c,c,10000,nil)
end end
...@@ -27,7 +27,7 @@ end ...@@ -27,7 +27,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.SearchCard(LOCATION_MZONE,LOCATION_HAND,cm.filter2)(e,tp,eg,ep,ev,re,r,rp) vgf.CardsFromTo(REASON_EFFECT,LOCATION_MZONE,LOCATION_HAND,cm.filter2)(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