Commit 91c60cc8 authored by xiaoye's avatar xiaoye

新增对能量发生器的定义

parent 2d101774
VgDefinition={} VgDefinition={}
VgID=10000001 VgID=10000001
CARD_ENERGY=10800730
CARD_ENERGY_EMBLEM=10800851
--min/max value --min/max value
MIN_ID =1000 --4 digits, by DataManager::GetDesc() MIN_ID =1000 --4 digits, by DataManager::GetDesc()
MAX_ID =268435455 --28 bits, by DataManager::GetDesc() MAX_ID =268435455 --28 bits, by DataManager::GetDesc()
......
...@@ -639,13 +639,13 @@ function VgF.EnergyCost(val) ...@@ -639,13 +639,13 @@ function VgF.EnergyCost(val)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
VgF.AddMixCostGroupFrom(c,m,"LOCATION_EMBLEM") VgF.AddMixCostGroupFrom(c,m,"LOCATION_EMBLEM")
VgF.AddMixCostGroupTo(c,m,"0") VgF.AddMixCostGroupTo(c,m,"0")
VgF.AddMixCostGroupFilter(c,m,function(tc) tc:IsCode(10800730) end) VgF.AddMixCostGroupFilter(c,m,function(tc) tc:IsCode(CARD_ENERGY) end)
VgF.AddMixCostGroupCountMin(c,m,val) VgF.AddMixCostGroupCountMin(c,m,val)
VgF.AddMixCostGroupCountMax(c,m,val) VgF.AddMixCostGroupCountMax(c,m,val)
end end
return VgF.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EMBLEM,0,val,nil,10800730) return VgF.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EMBLEM,0,val,nil,CARD_ENERGY)
end end
local sg=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730) local sg=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,CARD_ENERGY)
local g=VgF.GetCardsFromGroup(sg,val) local g=VgF.GetCardsFromGroup(sg,val)
return VgF.Sendto(0,g,tp,POS_FACEUP,REASON_COST) return VgF.Sendto(0,g,tp,POS_FACEUP,REASON_COST)
end end
......
--能量 local cm,m,o=GetID()
function c10800730.initial_effect(c) function cm.initial_effect(c)
vgf.VgCard(c)
end end
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
end
...@@ -32,9 +32,9 @@ function cm.con1(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,9 +32,9 @@ function cm.con1(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.op1(e,tp,eg,ep,ev,re,r,rp) function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local code=10800730 local code=CARD_ENERGY
local selfcode1,selfcode2=c:GetOriginalCode() local selfcode1,selfcode2=c:GetOriginalCode()
if selfcode2==10800855 then code=code+1 end if selfcode2~=CARD_ENERGY_EMBLEM then code=code+1 end
local token1=Duel.CreateToken(tp,code) local token1=Duel.CreateToken(tp,code)
local token2=Duel.CreateToken(tp,code) local token2=Duel.CreateToken(tp,code)
local token3=Duel.CreateToken(tp,code) local token3=Duel.CreateToken(tp,code)
...@@ -46,9 +46,9 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,9 +46,9 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp) function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local code=10800730 local code=CARD_ENERGY
local selfcode1,selfcode2=c:GetOriginalCode() local selfcode1,selfcode2=c:GetOriginalCode()
if selfcode2==10800855 then code=code+1 end if selfcode2~=CARD_ENERGY_EMBLEM then code=code+1 end
if vgf.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,code)>=10 then return end if vgf.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,code)>=10 then return end
local ct=10-vgf.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,code) local ct=10-vgf.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,code)
local token1=Duel.CreateToken(tp,code) local token1=Duel.CreateToken(tp,code)
......
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