Commit 1008ab21 authored by salix5's avatar salix5

Card.IsOriginalCodeRule()

parent 53a2b666
......@@ -31,8 +31,7 @@ function c10000040.initial_effect(c)
c:RegisterEffect(e4)
end
function c10000040.spfilter(c,code)
local code1,code2=c:GetOriginalCodeRule()
return code1==code or code2==code
return c:IsOriginalCodeRule(code)
end
function c10000040.spcon(e,c)
if c==nil then return true end
......
......@@ -50,11 +50,11 @@ function c11163040.filter(c,e,tp)
and Duel.IsExistingMatchingCard(c11163040.chkfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetControler(),c:GetOriginalCodeRule())
end
function c11163040.chkfilter(c,e,tp,cc,code)
return c:IsSetCard(0xd3) and c:GetOriginalCodeRule()~=code and
return c:IsSetCard(0xd3) and not c:IsOriginalCodeRule(code) and
not c:IsHasEffect(EFFECT_REVIVE_LIMIT) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,cc,c)
end
function c11163040.spfilter(c,e,tp,cc,code)
return c:IsSetCard(0xd3) and c:GetOriginalCodeRule()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,cc)
return c:IsSetCard(0xd3) and not c:IsOriginalCodeRule(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,cc)
end
function c11163040.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c11163040.filter(chkc,e,tp) end
......
......@@ -20,12 +20,11 @@ function c20513882.cfilter(c,tp)
and Duel.IsExistingMatchingCard(c20513882.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c)
end
function c20513882.thfilter(c,tc)
local code1,code2=tc:GetOriginalCode()
return c:IsType(TYPE_MONSTER)
and c:GetOriginalLevel()==tc:GetOriginalLevel()
and c:GetOriginalRace()==tc:GetOriginalRace()
and c:GetOriginalAttribute()==tc:GetOriginalAttribute()
and c:GetOriginalCode()~=code1 and c:GetOriginalCode()~=code2
and not c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
and c:IsAbleToHand()
end
function c20513882.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -29,7 +29,7 @@ function c24224830.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c24224830.distg)
e1:SetLabel(tc:GetOriginalCode())
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
......@@ -37,20 +37,18 @@ function c24224830.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c24224830.discon)
e2:SetOperation(c24224830.disop)
e2:SetLabel(tc:GetOriginalCode())
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
end
function c24224830.distg(e,c)
local code=e:GetLabel()
local code1,code2=c:GetOriginalCodeRule()
return code1==code or code2==code
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c24224830.discon(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
local code1,code2=re:GetHandler():GetOriginalCodeRule()
return re:IsActiveType(TYPE_MONSTER) and (code1==code or code2==code)
local tc=e:GetLabelObject()
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c24224830.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
......
......@@ -25,7 +25,8 @@ function c41803903.thfilter(c,e,tp)
end
function c41803903.spfilter(c,e,tp,hc)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x10ec)
and c:GetOriginalCode()~=hc:GetOriginalCode() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and not c:IsOriginalCodeRule(hc:GetOriginalCodeRule())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and Duel.GetLocationCountFromEx(tp,tp,hc,c)>0
end
function c41803903.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -42,5 +42,5 @@ end
function c7403341.aclimit(e,re,tp)
local c=re:GetHandler()
local tc=e:GetLabelObject()
return c:GetOriginalCode()==tc:GetOriginalCode() and not c:IsImmuneToEffect(e)
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and not c:IsImmuneToEffect(e)
end
......@@ -26,7 +26,7 @@ end
function c8608979.filter2(c,tc,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:GetOriginalRace()==tc:GetOriginalRace()
and c:GetOriginalCode()~=tc:GetOriginalCode()
and not c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c8608979.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) and c8608979.filter1(chkc,e,tp) end
......
......@@ -17,15 +17,14 @@ function c9581215.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c9581215.rmfilter(c,p,code)
return c:IsAbleToRemove(p) and c:IsCode(code)
function c9581215.rmfilter(c,p,tc)
return c:IsAbleToRemove(p) and c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c9581215.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateEffect(ev) then return end
Duel.BreakEffect()
local sel=1
local code=eg:GetFirst():GetCode()
local g=Duel.GetMatchingGroup(c9581215.rmfilter,tp,0,LOCATION_HAND+LOCATION_DECK,nil,1-tp,code)
local g=Duel.GetMatchingGroup(c9581215.rmfilter,tp,0,LOCATION_HAND+LOCATION_DECK,nil,1-tp,eg:GetFirst())
local tg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(9581215,0))
if g:GetCount()>0 then
......
......@@ -327,7 +327,7 @@ EFFECT_CANNOT_DISABLE_SPSUMMON =27 --特殊召唤不会无效
EFFECT_SET_SUMMON_COUNT_LIMIT =28 --限制每回合放置怪兽次数
EFFECT_EXTRA_SUMMON_COUNT =29 --增加召唤(通常召唤)次数
EFFECT_SPSUMMON_CONDITION =30 --特殊召唤条件
EFFECT_REVIVE_LIMIT =31 --有苏生限制的怪獸
EFFECT_REVIVE_LIMIT =31 --有苏生限制的怪獸(Card.EnableReviveLimit())
EFFECT_SUMMON_PROC =32 --召唤规则效果
EFFECT_LIMIT_SUMMON_PROC =33 --召唤规则限制
EFFECT_SPSUMMON_PROC =34 --特殊召唤规则
......@@ -517,7 +517,7 @@ EFFECT_CANNOT_SELECT_BATTLE_TARGET =332 --對手不能選擇為攻擊對象
EFFECT_CANNOT_SELECT_EFFECT_TARGET =333 --對手不能選擇為效果對象
EFFECT_ADD_SETCODE =334 --视为「XX」字段的效果
EFFECT_NO_EFFECT_DAMAGE =335 --玩家已受到"效果傷害變成0"的效果影響
EFFECT_UNSUMMONABLE_CARD =336 --不能通常召唤的怪獸
EFFECT_UNSUMMONABLE_CARD =336 --不能通常召唤的怪獸(Card.EnableReviveLimit())
EFFECT_DISABLE_CHAIN_FIELD =337 --N/A
EFFECT_DISCARD_COST_CHANGE =338 --反制陷阱捨棄手牌的代價改變(解放之阿里阿德涅)
EFFECT_HAND_SYNCHRO =339 --用手牌的怪獸當作同步素材
......
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