Commit c9827f64 authored by POLYMER's avatar POLYMER

fix

parent 958028af
......@@ -49,7 +49,7 @@ function xg.epp(c, id, su, ...) --XG.epp(c,id,su,...) 不推荐使用
end
for _, o in pairs(l2) do
if su[o] == nil or su[o] == "" then
su[o] = cm.TRUE
su[o] = aux.TRUE
end
end
end
......@@ -315,3 +315,47 @@ function cm.sxblx(tp, kx, zzx, sxx, zzl) --宣言1个可特招的种族属性等
local lv = Duel.AnnounceLevel(tp, 1, 12, table.unpack(slv))
return zz, sx, lv
end
function cm.AddMonsterate(c, type, attribute, race, level, atk, def) --不会因盖放充值的魔陷怪兽
local e1_1 = Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CHANGE_TYPE)
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e1_1:SetValue(type)
e1_1:SetReset(RESET_EVENT + RESETS_STANDARD - RESET_TEMP_REMOVE - RESET_TOFIELD - RESET_LEAVE - RESET_TURN_SET)
c:RegisterEffect(e1_1, true)
-- Debug.Message(attribute)
-- Debug.Message(race)
-- Debug.Message(level)
if attribute then
local e11 = e1_1:Clone()
e11:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e11:SetValue(attribute)
c:RegisterEffect(e11)
end
if race then
local e12 = e1_1:Clone()
e12:SetCode(EFFECT_CHANGE_RACE)
e12:SetValue(race)
c:RegisterEffect(e12)
end
if not level then
level = 1
end
local e123 = e1_1:Clone()
e123:SetCode(EFFECT_UPDATE_LEVEL)
e123:SetValue(level)
c:RegisterEffect(e123)
if atk then
local e1234 = e1_1:Clone()
e1234:SetCode(EFFECT_SET_ATTACK)
e1234:SetValue(atk)
c:RegisterEffect(e1234)
end
if def then
local e1 = e1_1:Clone()
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(def)
c:RegisterEffect(e1)
end
end
......@@ -103,7 +103,7 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
function cm.deop(e,tp,eg,ep,ev,re,r,rp)
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMatchingGroupCount(cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil)<=0
or Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
......@@ -30,12 +30,11 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.thfilter(c)
return not c:IsCode(m) and (c:IsSetCard(0x51) or (aux.IsCodeOrListed(c,36322312) or c:IsCode(63717421))) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return not c:IsCode(m) and (c:IsSetCard(0x51) or (aux.IsCodeListed(c,36322312) or c:IsCode(36322312))) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
......
......@@ -8,7 +8,7 @@ function cm.initial_effect(c)
--add
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
--e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
......@@ -38,7 +38,7 @@ end
function cm.gchk(g)
return g:IsExists(Card.IsType,1,nil,TYPE_PENDULUM)
end
function cm.xepfilter(c)
function cm.expfilter(c)
return c:IsLinkType(TYPE_PENDULUM) and c:IsSetCard(0x99)
end
function cm.valcheck(e,c)
......
......@@ -251,6 +251,6 @@ function s.geop(e,tp,eg,ep,ev,re,r,rp)
if con then te:SetCondition(s.con(con)) end
return f(tc,te,bool)
end
for tc in aux.Next(cg) do cm.ReplaceEffect(tc,tc:GetOriginalCode(),0) end
for tc in aux.Next(cg) do s.ReplaceEffect(tc,tc:GetOriginalCode(),0) end
Card.RegisterEffect=f
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