Commit a3da1ccd authored by xiaoye's avatar xiaoye

fix

parent ffc3a683
......@@ -482,7 +482,7 @@ function VgD.MonsterAttackAnnounceCondition(e,c)
end
function VgD.MonsterAttackCondition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not VgF.VMonsterFilter(c) then return false end
if not VgF.VMonsterFilter(c) and c:GetFlagEffect(FLAG_ALSO_CAN_TRIGGER)==0 then return false end
local a=c:GetFlagEffectLabel(FLAG_ATTACK_TRIGGER) and c:GetFlagEffectLabel(FLAG_ATTACK_TRIGGER)>0
return a and Duel.GetAttacker()==c
end
......
......@@ -864,6 +864,7 @@ FLAG_ATTACK_AT_REAR =VgID+6 --后列攻击
FLAG_IMPRISON =VgID+7 --被收容
FLAG_SPELL_COUNT_LIMIT =VgID+8 --指令卡次数
FLAG_SPELL_USED_COUNT =VgID+9 --指令卡已使用次数
FLAG_ALSO_CAN_TRIGGER =VgID+10--后防着也能驱动判定
--AffectedByEffect
AFFECT_CODE_MIX =VgID --魔合成
AFFECT_CODE_MIX_DIFFERENT_NAME =VgID+1 --魔合成(卡名不同)
......
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.CardTrigger(c,cm.operation)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_ADJUST)
e1:SetOperation(cm.op)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.GetMatchingGroup(e,cm.filter,tp,LOCATION_MZONE,0,nil)
for tc in vgf.Next(g) do
tc:RegisterFlagEffect(FLAG_ALSO_CAN_TRIGGER,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function cm.filter(c)
return vgf.RMonsterFilter(c) and c:GetFlagEffect(FLAG_ALSO_CAN_TRIGGER)==0 and c:IsFaceup()
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.op,cm.cost,cm.con)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_CUSTOM+EVENT_SUPPORT,cm.op,cm.cost,cm.con1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=vgf.GetVMonster(tp):GetOverlayGroup()
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
g=g:Select(tp,1,1,nil)
vgf.Sendto(LOCATION_HAND,g,nil,REASON_EFFECT)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return vgf.IsExistingMatchingCard(nil,vgf.RMonsterFilter,tp,LOCATION_MZONE,0,1,c) 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_OVERLAY,nil,tp,vgf.RMonsterFilter,tp,LOCATION_MZONE,0,1,c)
vgf.Sendto(LOCATION_OVERLAY,g)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffectLabel(tp,FLAG_CONDITION)==10102001
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return cm.con(e,tp,eg,ep,ev,re,r,rp) and re:GetHandler()==e:GetHandler()
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op,vgf.OverlayCost(1),vgf.RMonsterCondition,nil,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
vgf.AtkUp(c,c,2000)
local g=vgf.SelectMatchingCard(HINTMSG_OPPO,e,tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
vgf.SendtoPrison(g,tp)
end
function cm.filter(c)
return vgf.IsSequence(c,0,4)
end
\ No newline at end of file
......@@ -22,8 +22,10 @@ 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)
cm.cos_g=vgf.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup():Filter(Card.IsLevel,nil,3)
cm.cos_val={nil,1,1}
if chk==0 then
vgf.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup():Filter(Card.IsLevel,nil,3)
vgf.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup():IsExists(Card.IsLevel,1,nil,3)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g=vgf.GetMatchingGroup(vgf.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():FilterSelect(tp,Card.IsLevel,1,1,nil,3)
......
......@@ -7,6 +7,8 @@ function cm.initial_effect(c)
vgd.SpellActivate(c,m,cm.operation,cm.cost)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
cm.cos_g=Duel.GetMatchingGroup(vgf.RMonsterFilter,tp,LOCATION_MZONE,0,nil)
cm.cos_val={nil,2,2}
if chk==0 then return vgf.IsExistingMatchingCard(vgf.RMonsterFilter,tp,LOCATION_MZONE,0,2,nil) end
local g=vgf.SelectMatchingCard(HINTMSG_LEAVEONFIELD,e,tp,vgf.RMonsterFilter,tp,LOCATION_MZONE,0,2,2,nil)
vgf.Sendto(LOCATION_DROP,g,REASON_COST)
......
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