Commit 829feb3c authored by xiaoye's avatar xiaoye

fix

parent 103b2164
...@@ -587,6 +587,22 @@ function VgF.CostAnd(f1,f2,c1,c2) ...@@ -587,6 +587,22 @@ function VgF.CostAnd(f1,f2,c1,c2)
end end
end end
function VgF.ChangePosAttack(c)
return function (e,tp,eg,ep,ev,re,r,rp,chk)
if VgF.GetValueType(c)~="Card" then c=e:GetHandler() end
if chk==0 then return c:IsCanChangePosition() and c:IsPosition(POS_FACEUP_DEFENCE) end
Duel.ChangePosition(c,POS_FACEUP_ATTACK)
end
end
function VgF.ChangePosDefence(c)
return function (e,tp,eg,ep,ev,re,r,rp,chk)
if VgF.GetValueType(c)~="Card" then c=e:GetHandler() end
if chk==0 then return c:IsCanChangePosition() and c:IsPosition(POS_FACEUP_ATTACK) end
Duel.ChangePosition(c,POS_FACEUP_DEFENCE)
end
end
---用于效果的Cost。它返回一个执行“【费用】[将手牌中的val张卡舍弃]”的函数。 ---用于效果的Cost。它返回一个执行“【费用】[将手牌中的val张卡舍弃]”的函数。
---@param val integer 要舍弃的卡的数量 ---@param val integer 要舍弃的卡的数量
---@return function 效果的Cost函数 ---@return function 效果的Cost函数
......
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op,cm.cost,cm.con)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_PHASE+PHASE_BATTLE_START,cm.op1,nil,cm.con1)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanChangePosition() and e:GetHandler():IsPosition(POS_FACEUP_ATTACK) and vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) end
vgf.OverlayCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENCE)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.RMonsterCondition(e) and vgf.GetVMonster(tp):IsCode(10401002)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.SelectMatchingCard(HINTMSG_LEAVEFIELD,e,tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
vgf.ChangePosAttack(c)(e,tp,eg,ep,ev,re,r,rp)
vgf.AtkUp(c,c,5000)
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return vgf.GetMatchingGroupCount(vgf.VMonsterFilter,tp,0,LOCATION_MZONE,nil)<=1
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.BeRidedByCard(c,m,cm.filter,cm.op)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op1,vgf.OverlayCost(1),cm.con1,nil,1)
end end
function cm.filter(c)
return c:IsSetCard(0x79)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
vgf.Sendto(LOCATION_MZONE,c,0,tp)
end
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Group.FromCards(vgf.GetVMonster(tp))
if c:IsRelateToEffect(e) and c:IsFaceup() then
g:AddCard(c)
end
vgf.AtkUp(c,g,5000)
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return vgf.RMonsterCondition(e) and vgf.GetVMonster(tp):IsSetCard(0x79)
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_ATTACK_ANNOUNCE,cm.op,nil,cm.con)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.RMonsterCondition(e) and vgf.GetVMonster(tp):IsSetCard(0x79)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=vgf.AtkUp(c,c,5000,nil)
vgf.EffectReset(c,e1,EVENT_BATTLED)
end
Duel.BreakEffect()
if vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectEffectYesNo(tp,vgf.stringid(VgID,10)) then
vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,1)
local g=vgf.SelectMatchingCard(HINTMSG_LEAVEFIELD,e,tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
end
end
function cm.filter(c)
return vgf.RMonsterFilter(c) and c:IsLevelBelow(2)
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,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,vgf.SearchCard(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)
end end
function cm.filter(c)
return c:IsLevel(0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_ATKUP,e,tp,Card.IsLevel,tp,LOCATION_MZONE,0,1,1,nil,0)
vgf.AtkUp(c,g,5000)
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.EffectTypeContinuousChangeDefense(c,m,EFFECT_TYPE_SINGLE,5000,cm.con)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.GetVMonster(1-tp):IsLevelAbove(3)
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,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,cm.cost,vgf.RSummonCondition)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) end
vgf.SearchCard(LOCATION_OVERLAY,LOCATION_HAND,nil,1)
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.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op,vgf.OverlayCost(1))
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local ct=Duel.GetFlagEffectLabel(tp,FLAG_CONDITION)
if VgF.GetValueType(ct)=="number" and ct==10102001 and c:IsRelateToEffect(e) and c:IsFaceup() then
vgf.AtkUp(c,c,5000,nil)
end
end
function cm.aclimit(e,re,tp)
return re:IsHasCategory(CATEGORY_DEFENDER) and re:GetHandler():IsLocation(LOCATION_MZONE)
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment