Commit dd0db6df authored by xiaoye's avatar xiaoye

fix

parent 971317da
......@@ -7,7 +7,6 @@ function cm.initial_effect(c)
-- 白翼-【起】【V】【1回合1次】:通过【费用】[计数爆发1],这个回合中,这个单位的☆+1。
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op2,vgf.DamageCost(1),cm.con2,nil,1)
-- 黑翼-【永】【V】:这个单位攻击的战斗中,对手不能将触发单位卡从手牌CALL到G上。
-- (黑翼效果未完成)
VgD.CannotCallToGZoneWhenAttack(c,m,function (e,re,tp)
return re:GetHandler():IsType(TYPE_TRIIGER) and re:GetHandler():IsLocation(LOCATION_HAND)
end,cm.con3)
......@@ -37,5 +36,5 @@ function cm.op2(e,tp,eg,ep,ev,re,r,rp)
vgf.StarUp(c,c,1)
end
function cm.con3(e)
return Duel.GetAttacker()==e:GetHandler() and vgf.VMonsterCondition(e) and vgf.DarkWing(e)
return vgf.VMonsterCondition(e) and vgf.DarkWing(e)
end
\ No newline at end of file
......@@ -3,15 +3,9 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 【自】:这个单位被RIDE时,通过【费用】[将手牌中的1张〈幽灵〉的普通单位卡公开,放置到牌堆顶],选择你的弃牌区中的1张〈幽灵〉,加入手牌。
vgd.BeRidedByCard(c,m,nil,cm.op,cm.cost)
vgd.BeRidedByCard(c,m,nil,VgF.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DROP,Card.IsSetCard,1,0,0xa013),cm.cost)
-- 【永】【V/R】:你的回合中,你的R上的〈幽灵〉有3张以上的话,这个单位的力量+5000。
vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,5000,cm.con1)
vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,5000,cm.con2)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
VgF.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DROP,cm.filter,1,0)(e,tp,eg,ep,ev,re,r,rp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -22,21 +16,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.con1(e)
return cm.con3(e) and vgf.RMonsterCondition(e) and Duel.GetTurnPlayer()==tp
end
function cm.con2(e)
return cm.con3(e) and vgf.VMonsterCondition(e) and Duel.GetTurnPlayer()==tp
end
function cm.con3(e)
local c = e:GetHandler()
local tp = e:GetHandlerPlayer()
return vgf.IsExistingMatchingCard(cm.filter2,tp,LOCATION_MZONE,0,3)
end
function cm.filter1(c)
return c:IsSetCard(0xa013)
return vgf.IsExistingMatchingCard(cm.filter2,tp,LOCATION_MZONE,0,3,nil) and vgf.RMonsterCondition(e) and Duel.GetTurnPlayer()==tp
end
function cm.filter2(c)
......@@ -44,5 +25,5 @@ function cm.filter2(c)
end
function cm.filter3(c)
return c:IsSetCard(0xa013) and c:IsType(TYPE_EFFECT+TYPE_MONSTER)
return c:IsSetCard(0xa013) and c:IsType(TYPE_NORMAL+TYPE_MONSTER)
end
\ No newline at end of file
......@@ -14,17 +14,12 @@ end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_ATOHAND,e,tp,cm.filter,tp,LOCATION_MZONE+LOCATION_OVERLAY,0,0,1,nil)
local g=vgf.SelectMatchingCard(HINTMSG_ATOHAND,e,tp,nil,tp,LOCATION_RZONE+LOCATION_OVERLAY,0,0,1,nil)
if #g>0 then
local tc=g:GetFirst()
vgf.Sendto(LOCATION_HAND,tc,tp)
if tc:IsPreviousLocation(LOCATION_OVERLAY) then
local rc=vgf.GetVMonster(tp)
vgf.Sendto(LOCATION_OVERLAY,c,rc)
if not tc:IsPreviousLocation(LOCATION_MZONE) then
vgf.Sendto(LOCATION_OVERLAY,c)
end
end
end
function cm.filter(c)
return c:IsCanBeEffectTarget()
end
\ No newline at end of file
......@@ -3,7 +3,6 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 【永】【V】:【永】【V】:你的回合中,你的指令区中有正面表示的歌曲卡的话,这个单位的力量+5000。
vgd.EffectTypeContinuousChangeAttack(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,5000,cm.con1)
-- 【自】:这个单位被RIDE时,选择你的牌堆或手牌中的至多1张等级2的歌曲卡,公开后放置到指令区,从牌堆探寻了的话,牌堆洗切。从手牌放置了的话,抽卡1张。
vgd.BeRidedByCard(c,m,nil,cm.operation)
......
......@@ -3,13 +3,10 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 【自】【V】【1回合1次】:你施放宝石卡时,抽1张卡。
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_CHAINING,cm.op,nil,cm.con1,nil,1)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_CHAINING,vgf.Draw,nil,cm.con1,nil,1)
-- 【永】【G】:你的弃牌区中的宝石卡每有2张,这个单位的盾护+5000。
vgd.EffectTypeContinuousChangeDefense(c,m,EFFECT_TYPE_SINGLE,cm.val,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp and vgf.VMonsterCondition(e)
......
......@@ -3,35 +3,23 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 【自】:这个单位登场到R时,选择你的弃牌区中的相互同名的至多2张宝石卡,将1张放置到牌堆底,其余的卡放置到灵魂里。
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,nil,cm.con)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,nil,vgf.RSummonCondition)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g1=vgf.SelectMatchingCard(HINTMSG_CONFIRM,e,tp,cm.filter1,tp,LOCATION_GRAVE,0,0,1,nil)
if #g1 ~= 0 then
local cg1=g1:GetFirst()
local cg1code=cg1:GetCode()
vgf.Sendto(LOCATION_DECK,cg1,nil,SEQ_DECKBOTTOM,REASON_COST)
local g2count=vgf.GetMatchingGroupCount(cm.filter2,tp,LOCATION_GRAVE,0,cg1)
if g2count ~= 0 then
local g2=vgf.SelectMatchingCard(HINTMSG_CONFIRM,e,tp,cm.filter1,tp,LOCATION_GRAVE,0,0,1,cg1)
if #g2 ~= 0 then
local rc=vgf.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst()
vgf.Sendto(LOCATION_OVERLAY,g2,rc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local g=vgf.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DROP,0,nil,0xc040):SelectSubGroup(tp, cm.filter, false, 0, 2)
local step = 0
g:ForEach(function (c)
if step == 0 then
vgf.Sendto(LOCATION_DECK,c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
step = step + 1
else
vgf.Sendto(LOCATION_OVERLAY,c)
end
end
end)
end
function cm.filter1(c)
return c:IsSetCard(0xc040)
end
function cm.filter2(c,code)
return c:IsCode(code)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.RSummonCondition(e)
function cm.filter(g)
return g:GetClassCount(Card.GetCode) <= 1
end
\ No newline at end of file
......@@ -8,13 +8,13 @@ end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
local ph = Duel.GetCurrentPhase()
local ph = Duel.GetCurrentPhase()
return vgf.RSummonCondition(e) and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) and Duel.GetTurnPlayer() == tp
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
vgf.AtkUp(c,c,1000)
vgf.AtkUp(c,c,10000)
end
end
\ No newline at end of file
......@@ -3,6 +3,7 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 【自】:这个单位从手牌登场到R时,公开你的牌堆顶的1张卡,那张卡是等级2以外的单位卡的话,将那张卡CALL到不存在单位的R上。没有CALL出场的话,将被公开的卡放置到牌堆底。
vgd.EffectTypeTrigger(c,m,loc,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,nil,cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
......@@ -10,11 +11,9 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
Duel.ConfirmCards(tp,g)
Duel.ConfirmCards(1-tp,g)
local ctop=g:GetFirst()
if ctop:IsType(TYPE_MONSTER) and ctop:GetLevel()~=2 and vgf.IsCanBeCalled(ctop,e,tp) then
vgf.Sendto(LOCATION_MZONE,ctop,0,tp,"NoMonster")
else
Duel.MoveSequence(ctop,1)
local tc=g:GetFirst()
if tc:IsType(TYPE_MONSTER) and tc:GetLevel()~=2 and vgf.IsCanBeCalled(tc,e,tp) and vgf.Sendto(LOCATION_MZONE,tc,0,tp,"NoMonster")==0 then
Duel.MoveSequence(tc,1)
end
end
......
......@@ -3,24 +3,5 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 【自】:这个单位登场到R时,通过【费用】[灵魂爆发1,将手牌中的1张卡舍弃],选择你的弃牌区中的1张宝石卡,加入手牌。
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,cm.cost,cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_GRAVE,cm.filter1,1,1)
end
function cm.filter1(c)
return c:IsSetCard(0xc040)
end
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) and OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) end
vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
vgf.CardsFromTo(REASON_COST,LOCATION_GRAVE,LOCATION_HAND,nil,1,1)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.RSummonCondition(e)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DROP,Card.IsSetCard,1,1,0xc040),vgf.CostAnd(vgf.OverlayCost(1),vgf.DisCardCost(1)),vgf.RSummonCondition)
end
\ No newline at end of file
......@@ -3,22 +3,18 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 【自】:这个单位登场到R时,通过【费用】[计数爆发1,将手牌中的2张普通单位卡公开,按希望的顺序放置到牌堆底],选择你的1张先导者,从牌堆里探寻至多1张与那个单位同名的卡,公开后加入手牌,然后牌堆洗切。
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,cm.cost,cm.con)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,cm.cost,vgf.RSummonCondition)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local code=vgf.GetVMonster(tp):GetCode()
vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DECK,cm.filter1,1,0,code)
end
function cm.filter1(c,code)
return c:IsCode(code)
vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DECK,Card.IsCode,1,0,code)(e,tp,eg,ep,ev,re,r,rp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.IsExistingMatchingCard(cm.filter2,tp,LOCATION_HAND,0,2,nil) and vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then return vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,2,nil) 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)
local g=vgf.SelectMatchingCard(HINTMSG_CONFIRM,e,tp,cm.filter2,tp,LOCATION_HAND,0,2,2,nil)
local g=vgf.SelectMatchingCard(HINTMSG_CONFIRM,e,tp,cm.filter,tp,LOCATION_HAND,0,2,2,nil)
Duel.ConfirmCards(1-tp,g)
if vgf.Sendto(LOCATION_DECK,g,nil,SEQ_DECKTOP,REASON_COST)==#g then
Duel.SortDecktop(tp,tp,#g)
......@@ -29,13 +25,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function cm.filter2(c)
return c:IsType(TYPE_EFFECT+TYPE_MONSTER)
function cm.filter(c)
return c:IsType(TYPE_NORMAL+TYPE_MONSTER)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.RSummonCondition(e)
end
......@@ -4,24 +4,13 @@ function cm.initial_effect(c)
vgd.VgCard(c)
-- 白翼(你的封锁区中的卡只有奇数的等级的场合才有效)
-- 【自】:这个单位登场到R时,通过【费用】[计数爆发1,灵魂爆发1],选择你的弃牌区中的1张力量8000的卡,加入手牌。
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,cm.cost,cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
VgF.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DROP,cm.filter,1,1)(e,tp,eg,ep,ev,re,r,rp)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.CardsFromTo(REASON_EFFECT,LOCATION_HAND,LOCATION_DROP,cm.filter),vgf.CostAnd(vgf.DamageCost(1),vgf.OverlayCost(1)),cm.con)
end
function cm.filter(c)
return c:GetAttack()==8000
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) 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.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.RSummonCondition(e) and vgf.WhiteWing(e)
end
\ No newline at end of file
......@@ -3,18 +3,13 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 【自】【后列的R】【1回合1次】:你的战斗阶段中你其他的单位登场到R时,通过【费用】[灵魂爆发2],抽1张卡。
VgD.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_SPSUMMON_SUCCESS,cm.op,vgf.OverlayCost(2),cm.con,nil,1)
VgD.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_SPSUMMON_SUCCESS,vgf.Draw,vgf.OverlayCost(2),cm.con,nil,1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
local ph = Duel.GetCurrentPhase()
return vgf.BackFilter(c) and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) and Duel.GetTurnPlayer() == tp and eg:IsExists(nil,1,c,tp)
local ph = Duel.GetCurrentPhase()
return vgf.BackFilter(c) and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) and Duel.GetTurnPlayer() == tp and eg:IsExists(cm.filter,1,c,tp)
end
function cm.filter(c,tp)
return vgf.IsSummonTypeR(c) and c:IsControler(tp)
end
\ No newline at end of file
......@@ -14,8 +14,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=vgf.GetVMonster(tp)
return vgf.RMonsterCondition(e) and Duel.GetAttacker() == rc
return vgf.RMonsterCondition(e) and vgf.VMonsterFilter(Duel.GetAttacker())
end
......@@ -3,16 +3,11 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 【自】:这个单位登场到R时,选择你其他的1个单位,这个回合中,力量+10000。
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,nil,cm.con)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,nil,vgf.RSummonCondition)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_ATKUP,tp,nil,tp,LOCATION_MZONE,0,1,1,c)
vgf.AtkUp(c,g,10000)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.RSummonCondition(e)
end
end
\ No newline at end of file
......@@ -10,7 +10,6 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Draw(tp,2,REASON_EFFECT)
-- local g=vgf.SelectMatchingCard(HINTMSG_DISCARD,tp,nil,tp,LOCATION_HAND,0,1,1,nil)
VgF.CardsFromTo(REASON_EFFECT,LOCATION_DROP,LOCATION_HAND,nil,1,1)(e,tp,eg,ep,ev,re,r,rp)
local rc=vgf.GetVMonster(tp)
if c:IsRelateToEffect(e) then
......
......@@ -2,27 +2,22 @@
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- (设置指令在施放后,放置到指令区。)
-- (设置指令在施放后,放置到指令区。)
vgd.ContinuousSpell(c)
-- 【自】:这张卡被放置到指令区时,对手有等级3以上的先导者的话,抽1张卡。
vgd.EffectTypeTrigger(c,m,loc,EFFECT_TYPE_SINGLE,EVENT_MOVE,cm.op1,nil,cm.con1)
-- 【自】:这张卡被放置到指令区时,对手有等级3以上的先导者的话,抽1张卡。
vgd.EffectTypeTrigger(c,m,loc,EFFECT_TYPE_SINGLE,EVENT_MOVE,vgf.Draw,nil,cm.con1)
-- 【自】【指令区】:这张歌曲卡被歌唱时,选择你的1张先导者,这个回合中,☆+1。
vgd.EffectTypeTrigger(c,m,LOCATION_ORDER,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.DrawCard(1),nil,cm.condition)
vgd.EffectTypeIgnition(c,m,LOCATION_ORDER,cm.operation,vgf.OverlayFill(1),cm.condition1)
-- 【自】【指令区】:这张歌曲卡被歌唱时,选择你的1张先导者,这个回合中,☆+1。
vgd.EffectTypeTrigger(c,m,LOCATION_ORDER,EFFECT_TYPE_FIELD,EVENT_CUSTOM+EVENT_SING,cm.op,nil,cm.con)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.GetMatchingGroup(vgf.FrontFilter,tp,LOCATION_MZONE,0,nil)
local g=vgf.SelectMatchingCard(HINTMSG_VMONSTER,e,tp,nil,tp,LOCATION_VZONE,0,nil)
vgf.StarUp(c,g,1,nil)
end
......@@ -31,5 +26,5 @@ function cm.filter(c)
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler()) and Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil)
return cm.con(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil)
end
\ No newline at end of file
......@@ -14,15 +14,14 @@ function cm.initial_effect(c)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_ATKUP,e,tp,vgf.VMonsterFilter,tp,LOCATION_MZONE,0,1,1,nil)
local g=vgf.SelectMatchingCard(HINTMSG_VMONSTER,e,tp,nil,tp,LOCATION_VZONE,0,1,1,nil)
vgf.AtkUp(c,g,5000)
Duel.ChangePosition(c,POS_FACEDOWN_ATTACK)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.GetMatchingGroup(vgf.FrontFilter,tp,LOCATION_MZONE,0,nil)
vgf.AtkUp(c,g,5000,nil)
vgf.AtkUp(c,g,5000)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -3,16 +3,11 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 【自】【R】:这个单位攻击时,通过【费用】[计数爆发1],这个回合中,这个单位的力量+5000。
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.op,vgf.DamageCost(1),cm.con1)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.op,vgf.DamageCost(1),vgf.RMonsterCondition)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
vgf.AtkUp(c,c,5000,nil)
end
end
function cm.con1(e)
return vgf.RMonsterCondition(e)
end
end
\ No newline at end of file
......@@ -4,7 +4,7 @@ function cm.initial_effect(c)
vgd.VgCard(c)
-- 【自】【R】:这个单位攻击时,这个回合中你施放了指令卡的话,通过【费用】[灵魂爆发1],这个回合中,这个单位的力量+5000。
vgd.GlobalCheckEffect(c,m,EVENT_CHAIN_SOLVING,cm.checkcon)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.op,vgf.OverlayCost(1),cm.con1)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.op,vgf.OverlayCost(1),cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
......@@ -14,7 +14,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.con1(e)
function cm.con(e)
local tp=e:GetHandlerPlayer()
return vgf.RMonsterCondition(e) and Duel.GetFlagEffect(tp,m)>0
end
......
......@@ -7,12 +7,11 @@ function cm.initial_effect(c)
end
function cm.val(e)
local tp=e:GetHandlerPlayer()
local ct=vgf.GetMatchingGroupCount(nil,tp,LOCATION_ORDER,0,c)
local val=math.floor(ct)*2000
return val
local ct=vgf.GetMatchingGroupCount(nil,tp,LOCATION_ORDER,0,nil)
return ct*2000
end
function cm.con1(e)
function cm.con(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return vgf.RMonsterCondition(e) and Duel.GetTurnPlayer()==tp
......
......@@ -3,7 +3,7 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 【自】【R】:你的含有「诚意真心」的单位被攻击时,通过【费用】[将这个单位退场],选择1张正在被攻击的单位,这次战斗中,力量+10000。
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_BE_BATTLE_TARGET,cm.op,cm.cost,cm.con)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_BE_BATTLE_TARGET,cm.op,vgf.LeaveFieldCost,cm.con)
-- EFFECT_TYPE_FIELD
-- EVENT_BE_BATTLE_TARGET
end
......@@ -19,11 +19,6 @@ 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)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
vgf.Sendto(LOCATION_DROP,e:GetHandler(),REASON_COST)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Group.FromCards(Duel.GetAttackTarget())
......
......@@ -3,7 +3,7 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 黑翼(你的封锁区中的卡只有偶数的等级的场合才有效)-【自】:这个单位登场到R时,灵魂填充1,这个回合中,这个单位的获得『支援』的技能。
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,nil,vgf.DarkWing)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,nil,cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
vgf.OverlayFill(1)(e,tp,eg,ep,ev,re,r,rp)
......@@ -19,3 +19,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2)
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.DarkWing(e) and vgf.RSummonCondition(e)
end
\ No newline at end of file
......@@ -3,11 +3,7 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.VgCard(c)
-- 【自】:这个单位从手牌登场到R时,你其他的后防者有3张以上的话,通过【费用】[计数爆发1],抽1张卡。
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,vgf.DamageCost(1),cm.con)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.Draw,vgf.DamageCost(1),cm.con)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -7,8 +7,7 @@ function cm.initial_effect(c)
vgd.CardToG(c,m,cm.op,nil,vgf.DarkWing)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_OPPO,e,tp,cm.Filter,tp,0,LOCATION_MZONE,1,1,nil)
local g=vgf.SelectMatchingCard(HINTMSG_OPPO,e,tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
......
......@@ -1617,7 +1617,7 @@ end
---@param m number|nil 效果的创建者的卡号
---@param loc number 生效的区域
---@param typ number 只影响自己,则填EFFECT_TYPE_SINGLE;<br>影响场上,则填EFFECT_TYPE_FIELD。
---@param val number 变更的数值
---@param val function|number 变更的数值
---@param con function|nil 这个效果的条件函数
---@param tg function|nil 这个效果的影响目标(全域)
---@param loc_self number|nil 这个效果影响的自己区域,影响全域范围才需填
......@@ -1633,7 +1633,7 @@ end
---@param c Card 效果的创建者
---@param m number|nil 效果的创建者的卡号
---@param typ number 只影响自己,则填EFFECT_TYPE_SINGLE;<br>影响场上,则填EFFECT_TYPE_FIELD。
---@param val number 变更的数值
---@param val function|number 变更的数值
---@param con function|nil 这个效果的条件函数
---@param tg function|nil 这个效果的影响目标(全域)
---@param loc_self number|nil 这个效果影响的自己区域,影响全域范围才需填
......
......@@ -705,7 +705,7 @@ function VgF.LeaveFieldCost(card_code_func, val_max, val_min, except, ...)
val_min, val_max = val_min or 1, val_max or 1
if val_min > val_max then val_min = val_max end
local leave_filter = VgF.True
if type(card_code_func) == "function" then
if type(card_code_func) == "function" then
leave_filter = card_code_func
elseif type(card_code_func) == "number" then
leave_filter = function(c) return c:IsCode(card_code_func) end
......@@ -818,6 +818,7 @@ end
function Group.ForEach(g, f, ...)
local ext_params = {...}
if #g == 0 then return end
for c in VgF.Next(g) do
f(c, table.unpack(ext_params))
end
......@@ -1410,6 +1411,19 @@ end
function VgF.PlayerEffect(e, tp, eg, ep, ev, re, r, rp)
return true
end
---玩家抽1张卡
---@param p number 0:自己 1:对手 默认为0
---@param count number 抽count数量的卡 默认为1
function VgF.Draw(p, count)
p = (VgF.GetValueType(p) ~= "number" or p < 0 or p > 1) and 0 or p
count = VgF.GetValueType(count) ~= "number" and 1 or count
return function (e,tp,eg,ep,ev,re,r,rp)
local draw_player = p == 0 and tp or (1 - tp)
Duel.Draw(draw_player, count, REASON_EFFECT)
end
end
---创建一个函数检查器 检查func是否为nil或函数
function VgF.IllegalFunctionCheck(name, c)
if VgF.GetValueType(c) ~= "Card" then Debug.Message("VgD."..name.." param c isn't Card") 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