Commit a5f309ed authored by POLYMER's avatar POLYMER

fix

parent a6decafe
......@@ -19,7 +19,22 @@ Card.RegisterEffect=function(c,e,bool)
local e0=_Effect.CreateEffect(c)
_Effect.SetType(e0,EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
_Effect.SetCode(e0,EVENT_ADJUST)
_Effect.SetOperation(e0,cm.op)
_Effect.SetOperation(e0,function()
_Duel.Hint(HINT_CARD,0,m)
_Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,1))
local ct0=_Duel.GetMatchingGroupCount(_Card.IsCode,0,0xff,0,nil,m)
local ct1=_Duel.GetMatchingGroupCount(_Card.IsCode,0,0,0xff,nil,m)
if ct0>0 then
_Duel.Hint(HINT_SELECTMSG,1,aux.Stringid(m,2))
if _Duel.DisableActionCheck then _Duel.DisableActionCheck(true) end
_Duel.AnnounceCard(1,0,OPCODE_ISTYPE)
end
if ct1>0 then
_Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(m,2))
if _Duel.DisableActionCheck then _Duel.DisableActionCheck(true) end
_Duel.AnnounceCard(0,0,OPCODE_ISTYPE)
end
end)
_Duel.RegisterEffect(e0,0)
Card.RegisterEffect=_Card.RegisterEffect
_Card.RegisterEffect(c,e,bool)
......@@ -28,7 +43,22 @@ function cm.initial_effect(c)
local e0=_Effect.CreateEffect(c)
_Effect.SetType(e0,EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
_Effect.SetCode(e0,EVENT_ADJUST)
_Effect.SetOperation(e0,cm.op)
_Effect.SetOperation(e0,function()
_Duel.Hint(HINT_CARD,0,m)
_Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,1))
local ct0=_Duel.GetMatchingGroupCount(_Card.IsCode,0,0xff,0,nil,m)
local ct1=_Duel.GetMatchingGroupCount(_Card.IsCode,0,0,0xff,nil,m)
if ct0>0 then
_Duel.Hint(HINT_SELECTMSG,1,aux.Stringid(m,2))
if _Duel.DisableActionCheck then _Duel.DisableActionCheck(true) end
_Duel.AnnounceCard(1,0,OPCODE_ISTYPE)
end
if ct1>0 then
_Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(m,2))
if _Duel.DisableActionCheck then _Duel.DisableActionCheck(true) end
_Duel.AnnounceCard(0,0,OPCODE_ISTYPE)
end
end)
_Duel.RegisterEffect(e0,0)
local e1=_Effect.CreateEffect(c)
c:RegisterEffect(e1)
......@@ -52,12 +82,12 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if ct0>0 then
_Duel.Hint(HINT_SELECTMSG,1,aux.Stringid(m,2))
if _Duel.DisableActionCheck then _Duel.DisableActionCheck(true) end
pcall(_Duel.AnnounceCard,1,0,OPCODE_ISTYPE)
_Duel.AnnounceCard(1,0,OPCODE_ISTYPE)
end
if ct1>0 then
_Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(m,2))
if _Duel.DisableActionCheck then _Duel.DisableActionCheck(true) end
pcall(_Duel.AnnounceCard,0,0,OPCODE_ISTYPE)
_Duel.AnnounceCard(0,0,OPCODE_ISTYPE)
end
end
cm=readonly(cm)
\ No newline at end of file
......@@ -46,7 +46,7 @@ function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe08)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_EXTRA,0,nil)*-200
return Duel.GetMatchingGroupCount(cm.atkfilter,e:GetHandlerPlayer(),LOCATION_EXTRA,0,nil)*-200
end
function cm.penfilter(c)
return c:IsCode(13090003)
......
......@@ -56,7 +56,7 @@ function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe08)
end
function s.con(e)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil)
return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_EXTRA,0,1,nil)
end
function s.disfilter(c)
return aux.NegateAnyFilter and c:IsFaceup()
......
......@@ -57,7 +57,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsRace(RACE_MACHINE)
return re and re:GetHandler():IsRace(RACE_MACHINE) and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.rmfilter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
......
......@@ -40,7 +40,7 @@ function cm.synclv(e,c)
return (6<<16)+lv
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsRace(RACE_MACHINE)
return re and re:GetHandler():IsRace(RACE_MACHINE) and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.scfilter,tp,LOCATION_EXTRA,0,1,nil) or Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
......
......@@ -78,7 +78,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsRace(RACE_MACHINE)
return re and re:GetHandler():IsRace(RACE_MACHINE) and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.filter(c,e,tp)
return c:IsCode(15005130) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -53,7 +53,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.tfcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsRace(RACE_MACHINE)
return re and re:GetHandler():IsRace(RACE_MACHINE) and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and aux.IsCodeListed(c,15005130) and c:IsType(TYPE_CONTINUOUS)
......
......@@ -54,7 +54,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsRace(RACE_MACHINE)
return re and re:GetHandler():IsRace(RACE_MACHINE) and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......
......@@ -44,19 +44,27 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
e1:SetCondition(cm.retcon)
if Duel.GetTurnPlayer()==tp then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetValue(Duel.GetTurnCount())
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e1:SetValue(0)
end
Duel.RegisterEffect(e1,tp)
c:CreateEffectRelation(e1)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
if Duel.GetTurnPlayer()~=tp or Duel.GetTurnCount()==e:GetValue() then return false end
return e:GetLabelObject():IsRelateToEffect(e)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
......
......@@ -7031,7 +7031,7 @@ function cm.GetCurrentPhase()
end
function cm.Not_Destroyed_Count(c)
local flag=c:GetFlagEffectLabel(53766008) or 0
if flag<15 then
if flag<15 and c:IsLocation(LOCATION_ONFIELD) then
flag=flag+1
c:ResetFlagEffect(53766008)
c:RegisterFlagEffect(53766008,RESET_EVENT+0x1fc0000,EFFECT_FLAG_CLIENT_HINT,1,flag,aux.Stringid(53766008,flag))
......
......@@ -52,22 +52,24 @@ function c98921035.initial_effect(c)
e5:SetOperation(c98921035.damop)
c:RegisterEffect(e5)
end
function c98921035.hspfilter(c,tp,sc)
return c:IsFusionSetCard(0xb1) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and c:IsAbleToGrave()
function c98921035.hspfilter(c,sc)
return c:IsFusionSetCard(0xb1) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGraveAsCost() and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function c98921035.hspcon(e,c)
if c==nil then return true end
return Duel.IsExistingMatchingCard(c98921035.hspfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c98921035.hspfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c98921035.hspfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c98921035.hspfilter,tp,LOCATION_HAND,LOCATION_HAND,1,nil,c)
and Duel.IsExistingMatchingCard(c98921035.hspfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c) and Duel.IsExistingMatchingCard(c98921035.hspfilter,tp,LOCATION_DECK,LOCATION_DECK,1,nil,c)
end
function c98921035.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c98921035.hspfilter,tp,LOCATION_MZONE,0,1,1,nil)
local g1=Duel.SelectMatchingCard(tp,c98921035.hspfilter,tp,LOCATION_MZONE,0,1,1,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c98921035.hspfilter,tp,LOCATION_HAND,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,c98921035.hspfilter,tp,LOCATION_HAND,0,1,1,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,c98921035.hspfilter,tp,LOCATION_DECK,0,1,1,nil)
local g3=Duel.SelectMatchingCard(tp,c98921035.hspfilter,tp,LOCATION_DECK,0,1,1,nil,c)
g1:Merge(g2)
g1:Merge(g3)
c:SetMaterial(g1)
......
--彼岸的囚徒 教皇尼古拉
function c98921037.initial_effect(c)
c:SetSPSummonOnce(98921037)
--pendulum summon
aux.EnablePendulumAttribute(c)
--pendulum set
......
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