Commit 0626ebae authored by REIKAI's avatar REIKAI 💬

update

parent 77d998ac
No preview for this file type
...@@ -364,24 +364,26 @@ function fgo.spell(c,code,excode,lv,tcode) ...@@ -364,24 +364,26 @@ function fgo.spell(c,code,excode,lv,tcode)
--从自己的手卡·场上把等级合计直到lv星以上的怪兽解放,从手卡·卡组把「excode」特殊召唤。 --从自己的手卡·场上把等级合计直到lv星以上的怪兽解放,从手卡·卡组把「excode」特殊召唤。
--那之后,那只怪兽转化为tcode,把这张卡装备。 --那之后,那只怪兽转化为tcode,把这张卡装备。
local tc = c local tc = c
--local lv = lv or 0
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_SPECIAL_SUMMON) e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_ACTIVATE) e6:SetType(EFFECT_TYPE_ACTIVATE)
e6:SetCode(EVENT_FREE_CHAIN) e6:SetCode(EVENT_FREE_CHAIN)
e6:SetCountLimit(1,code) e6:SetCountLimit(1,code)
e6:SetCost(cm.FgoSpellEquipcost(lv)) e6:SetCost(fgo.FgoSpellEquipcost(lv))
e6:SetTarget(cm.FgoSpellEquiptg(excode)) e6:SetTarget(fgo.FgoSpellEquiptg(excode))
e6:SetOperation(cm.FgoSpellEquipop(c,excode,tcode)) e6:SetOperation(fgo.FgoSpellEquipop(c,excode,tcode))
tc:RegisterEffect(e6) tc:RegisterEffect(e6)
return e6 return e6
end end
function cm.spfilter(c) function cm.spfilter(c)
return c:GetLevel()>0 and c:IsType(TYPE_MONSTER) and c:IsReleasable() return c:GetLevel()>0 and c:IsType(TYPE_MONSTER) and c:IsReleasable()
end end
function cm.FgoSpellEquipcost(lv) function fgo.FgoSpellEquipcost(lv)
return function(e,tp,eg,ep,ev,re,r,rp,chk) return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil) local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil)
and g:CheckWithSumGreater(Card.GetLevel,lv,1,99) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:SelectWithSumGreater(tp,Card.GetLevel,lv) local sg=g:SelectWithSumGreater(tp,Card.GetLevel,lv)
Duel.Release(sg,REASON_COST+REASON_RELEASE) Duel.Release(sg,REASON_COST+REASON_RELEASE)
...@@ -390,7 +392,7 @@ end ...@@ -390,7 +392,7 @@ end
function cm.spellfilter(c,e,tp,code) function cm.spellfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end end
function cm.FgoSpellEquiptg(excode) function fgo.FgoSpellEquiptg(excode)
return function(e,tp,eg,ep,ev,re,r,rp,chk) return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spellfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,excode) if chk==0 then return Duel.IsExistingMatchingCard(cm.spellfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,excode)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
...@@ -398,7 +400,7 @@ function cm.FgoSpellEquiptg(excode) ...@@ -398,7 +400,7 @@ function cm.FgoSpellEquiptg(excode)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
end end
function cm.FgoSpellEquipop(c,excode,tcode) function fgo.FgoSpellEquipop(c,excode,tcode)
return function(e,tp,eg,ep,ev,re,r,rp) return function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -484,6 +484,7 @@ ...@@ -484,6 +484,7 @@
!setname 0x3cc2 狐宇宙侠 !setname 0x3cc2 狐宇宙侠
!setname 0xcc5 神帝 !setname 0xcc5 神帝
!setname 0xcc6 龙帝 !setname 0xcc6 龙帝
!setname 0xcca 异种
!setname 0xccb 天界 !setname 0xccb 天界
!setname 0xcc7 煌世 !setname 0xcc7 煌世
!setname 0xccc NOVA !setname 0xccc NOVA
......
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