Commit 731b4502 authored by jwyxym's avatar jwyxym Committed by GitHub

Add files via upload

parent f3a310a8
......@@ -579,7 +579,7 @@ function VgD.CardTriggerOperation(chkop,f)
Duel.Draw(tp,1,REASON_TRIGGER)
Duel.Exile(c,REASON_TRIGGER)
else
Duel.Sendto(c,tp,LOCATION_DAMAGE,POS_FACEUP,REASON_EFFECT)
Duel.Sendto(c,tp,LOCATION_DAMAGE,POS_FACEUP_ATTACK,REASON_EFFECT)
Duel.Damage(tp,1,REASON_TRIGGER)
end
local rc=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst()
......@@ -879,3 +879,14 @@ function VgD.QuickSpell(c,code,op,cost,con,tg)
if VgF.GetValueType(op)=="function" then e1:SetOperation(op) end
c:RegisterEffect(e1)
end
function VgD.EffectTypeContinuousChangeAttack(c,typ,val,con)
if not typ then typ=EFFECT_TYPE_SINGLE end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(type)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(con)
e1:SetValue(val)
c:RegisterEffect(e1)
end
\ No newline at end of file
......@@ -304,6 +304,13 @@ function VgF.IsAbleToGZone(c)
end
function VgF.DisCardCost(num)
return function (e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local m=c:GetOriginalCode()
local cm=_G["c"..m]
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
cm.cos_g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil)
cm.cos_val={nil,num,num}
end
if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,num,nil)
end
......@@ -314,6 +321,13 @@ function VgF.DisCardCost(num)
end
function VgF.EnegyCost(num)
return function (e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local m=c:GetOriginalCode()
local cm=_G["c"..m]
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
cm.cos_g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730)
cm.cos_val={nil,num,num}
end
if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EMBLEM,0,num,nil,10800730)
end
......@@ -324,6 +338,13 @@ function VgF.EnegyCost(num)
end
function VgF.OverlayCost(num)
return function (e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local m=c:GetOriginalCode()
local cm=_G["c"..m]
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
cm.cos_g=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup():FilterCount(Card.IsAbleToGraveAsCost,nil)
cm.cos_val={nil,num,num}
end
if chk==0 then
return Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil,nil):GetFirst():GetOverlayGroup():FilterCount(Card.IsAbleToGraveAsCost,nil)>=num
end
......@@ -334,6 +355,13 @@ function VgF.OverlayCost(num)
end
function VgF.OverlayFillCostOrOperation(num)
return function (e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local m=c:GetOriginalCode()
local cm=_G["c"..m]
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
cm.cos_g=Duel.GetFieldGroupCount(tp,LOCATION_DECK)
cm.cos_val={nil,num,num}
end
if chk==0 then
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=num
end
......@@ -345,6 +373,13 @@ function VgF.OverlayFillCostOrOperation(num)
end
function VgF.DamageCost(num)
return function (e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local m=c:GetOriginalCode()
local cm=_G["c"..m]
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
cm.cos_g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_DAMAGE,0,nil)
cm.cos_val={nil,num,num}
end
if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_DAMAGE,0,num,nil)
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