Commit daa730cf authored by jwyxym's avatar jwyxym Committed by GitHub

Add files via upload

parent 645a8772
...@@ -4,25 +4,23 @@ function cm.initial_effect(c) ...@@ -4,25 +4,23 @@ function cm.initial_effect(c)
vgf.VgCard(c) vgf.VgCard(c)
vgf.AddCodeList(c,10101009) vgf.AddCodeList(c,10101009)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation2,nil,cm.condition2) vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation2,nil,cm.condition2)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_CUSTOM+m,cm.operation3,vgf.OverlayCost(2),cm.condition3)
end 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.AtkUp(c,c,10000,nil) VgF.AtkUp(c,c,10000,nil)
Duel.RaiseEvent(c,EVENT_CUSTOM+m,e,0,tp,tp,0) if Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup():FilterCount(Card.IsAbleToGraveAsCost,nil)>=2 and Duel.SelectYesNo(vgf.Stringid(m,3)) then
end local cg=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():FilterSelect(tp,Card.IsAbleToGraveAsCost,2,2,nil)
function cm.operation3(e,tp,eg,ep,ev,re,r,rp) if Duel.SendtoGrave(cg,REASON_COST)==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LEAVEONFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LEAVEONFIELD)
local g=Duel.SelectTarget(tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
if g then if g then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end end
end end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp) function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return vgf.RMonsterCondition(e) and c:GetFlagEffectLabel(ConditionFlag)==201 and vgf.VMonsterFilter(Duel.GetAttackTarget()) return vgf.RMonsterCondition(e) and c:GetFlagEffectLabel(ConditionFlag)==201 and vgf.VMonsterFilter(Duel.GetAttackTarget())
end end
function cm.condition3(e,tp,eg,ep,ev,re,r,rp) \ No newline at end of file
return eg:GetFirst()==e:GetHandler()
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