Commit 30237f8a authored by Nemo Ma's avatar Nemo Ma

fix

parent 949fa409
--抉择之地·生命之森
--抉择之地·生命之森
local m=14000521
local cm=_G["c"..m]
function cm.initial_effect(c)
......@@ -36,8 +36,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
if Duel.GetFlagEffect(tp,14010281)==0 then
Duel.RegisterFlagEffect(tp,14010281,0,0,0)
if Duel.GetFlagEffect(tp,m)==0 then
Duel.RegisterFlagEffect(tp,m,0,0,0)
else
return
end
......@@ -45,8 +45,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
if Duel.GetFlagEffect(tp,14010281)==0 then
Duel.RegisterFlagEffect(tp,14010281,0,0,0)
if Duel.GetFlagEffect(tp,m)==0 then
Duel.RegisterFlagEffect(tp,m,0,0,0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(m)
......@@ -63,7 +63,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.check()
return Duel.IsPlayerAffectedByEffect(tp,m) and Duel.GetFlagEffect(tp,14010281)~=0
return Duel.IsPlayerAffectedByEffect(tp,m) and Duel.GetFlagEffect(tp,m)~=0
end
function cm.abdcon(e)
local at=Duel.GetAttackTarget()
......
......@@ -53,6 +53,8 @@ function c22348163.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c22348163.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local aaa=Duel.SelectMatchingCard(tp,c22348163.sprfilter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if not aaa then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g1=Duel.SelectMatchingCard(tp,c22348163.sprfilter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
......
......@@ -49,9 +49,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function c22348166.linkfilter(c)
return c:IsSetCard(0x705) and c:IsFaceup()
end
function c22348166.spcost(e,c,tp,st)
if bit.band(st,SUMMON_TYPE_LINK)~=SUMMON_TYPE_LINK then return true end
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x705)
return Duel.IsExistingMatchingCard(c22348166.linkfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c22348166.matfilter(c)
return c:IsLinkCode(22348157)
......
......@@ -49,9 +49,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function c22348167.linkfilter(c)
return c:IsSetCard(0x705) and c:IsFaceup()
end
function c22348167.spcost(e,c,tp,st)
if bit.band(st,SUMMON_TYPE_LINK)~=SUMMON_TYPE_LINK then return true end
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x705)
return Duel.IsExistingMatchingCard(c22348167.linkfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c22348167.matfilter(c)
return c:IsLinkCode(22348157)
......
......@@ -12,8 +12,6 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.adjustcon)
e2:SetOperation(cm.adjustop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
......@@ -100,18 +98,16 @@ function cm.trop(e,tp,eg,ep,ev,re,r,rp)
if #g1>0 then Duel.RaiseEvent(g1,EVENT_CUSTOM+m,re,r,rp,1,0) end
if #g2>0 then Duel.RaiseEvent(g2,EVENT_CUSTOM+m,re,r,rp,0,0) end
end
function cm.adjustcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local seq=e:GetHandler():GetSequence()
return not (Doremy_Summoning_Check or Doremy_Chain_Solving_Check or Doremy_Token_Check) and (cm.spcheck(tp,seq) or cm.spcheck(1-tp,4-seq)) and not ((ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or ph==PHASE_DAMAGE_CAL)
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
local seq=c:GetSequence()
if (Doremy_Summoning_Check or Doremy_Chain_Solving_Check or Doremy_Token_Check) or not (cm.spcheck(tp,seq) or cm.spcheck(1-tp,4-seq)) or ((ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or ph==PHASE_DAMAGE_CAL) or c:GetFlagEffect(m+50)>0 then return end
Duel.HintSelection(Group.FromCards(c))
cm.sp(c,tp,c:GetSequence())
cm.sp(c,1-tp,4-c:GetSequence())
Duel.SpecialSummonComplete()
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
c:RegisterFlagEffect(m+50,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.spcheck(tp,seq)
return SNNM.DressamLocCheck(tp,tp,1<<seq) and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0x9538,TYPES_TOKEN_MONSTER,2800,3200,1,RACE_FIEND,ATTRIBUTE_FIRE,POS_FACEUP,tp,0,1<<seq)
......
......@@ -12,8 +12,6 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.adjustcon)
e2:SetOperation(cm.adjustop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
......@@ -104,11 +102,14 @@ function cm.adjustcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
local seq=c:GetSequence()
if (Doremy_Summoning_Check or Doremy_Chain_Solving_Check or Doremy_Token_Check) or not (cm.spcheck(tp,seq) or cm.spcheck(1-tp,4-seq)) or ((ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or ph==PHASE_DAMAGE_CAL) or c:GetFlagEffect(m+50)>0 then return end
Duel.HintSelection(Group.FromCards(c))
cm.sp(c,tp,c:GetSequence())
cm.sp(c,1-tp,4-c:GetSequence())
Duel.SpecialSummonComplete()
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
c:RegisterFlagEffect(m+50,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.spcheck(tp,seq)
return SNNM.DressamLocCheck(tp,tp,1<<seq) and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0x9538,TYPES_TOKEN_MONSTER,1100,4800,2,RACE_FIEND,ATTRIBUTE_WATER,POS_FACEUP,tp,0,1<<seq)
......
......@@ -12,8 +12,6 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.adjustcon)
e2:SetOperation(cm.adjustop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
......@@ -89,18 +87,16 @@ end
function cm.trop(e,tp,eg,ep,ev,re,r,rp)
if re:GetActivateLocation()==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) then Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,1-rp,ev) end
end
function cm.adjustcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local seq=e:GetHandler():GetSequence()
return not (Doremy_Summoning_Check or Doremy_Chain_Solving_Check or Doremy_Token_Check) and (cm.spcheck(tp,seq) or cm.spcheck(1-tp,4-seq)) and not ((ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or ph==PHASE_DAMAGE_CAL)
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
local seq=c:GetSequence()
if (Doremy_Summoning_Check or Doremy_Chain_Solving_Check or Doremy_Token_Check) or not (cm.spcheck(tp,seq) or cm.spcheck(1-tp,4-seq)) or ((ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or ph==PHASE_DAMAGE_CAL) or c:GetFlagEffect(m+50)>0 then return end
Duel.HintSelection(Group.FromCards(c))
cm.sp(c,tp,c:GetSequence())
cm.sp(c,1-tp,4-c:GetSequence())
Duel.SpecialSummonComplete()
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
c:RegisterFlagEffect(m+50,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.spcheck(tp,seq)
return SNNM.DressamLocCheck(tp,tp,1<<seq) and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0x9538,TYPES_TOKEN_MONSTER,1800,4200,3,RACE_FIEND,ATTRIBUTE_EARTH,POS_FACEUP,tp,0,1<<seq)
......
......@@ -12,8 +12,6 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.adjustcon)
e2:SetOperation(cm.adjustop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
......@@ -100,18 +98,16 @@ function cm.trop(e,tp,eg,ep,ev,re,r,rp)
if #g1>0 then Duel.RaiseEvent(g1,EVENT_CUSTOM+m,re,r,rp,1,0) end
if #g2>0 then Duel.RaiseEvent(g2,EVENT_CUSTOM+m,re,r,rp,0,0) end
end
function cm.adjustcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local seq=e:GetHandler():GetSequence()
return not (Doremy_Summoning_Check or Doremy_Chain_Solving_Check or Doremy_Token_Check) and (cm.spcheck(tp,seq) or cm.spcheck(1-tp,4-seq)) and not ((ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or ph==PHASE_DAMAGE_CAL)
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
local seq=c:GetSequence()
if (Doremy_Summoning_Check or Doremy_Chain_Solving_Check or Doremy_Token_Check) or not (cm.spcheck(tp,seq) or cm.spcheck(1-tp,4-seq)) or ((ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or ph==PHASE_DAMAGE_CAL) or c:GetFlagEffect(m+50)>0 then return end
Duel.HintSelection(Group.FromCards(c))
cm.sp(c,tp,c:GetSequence())
cm.sp(c,1-tp,4-c:GetSequence())
Duel.SpecialSummonComplete()
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
c:RegisterFlagEffect(m+50,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.spcheck(tp,seq)
return SNNM.DressamLocCheck(tp,tp,1<<seq) and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0x9538,TYPES_TOKEN_MONSTER,2900,3000,4,RACE_FIEND,ATTRIBUTE_LIGHT,POS_FACEUP,tp,0,1<<seq)
......
......@@ -12,8 +12,6 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.adjustcon)
e2:SetOperation(cm.adjustop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
......@@ -78,18 +76,16 @@ end
function cm.creset(e,tp,eg,ep,ev,re,r,rp)
Doremy_Chain_Solving_Check=false
end
function cm.adjustcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local seq=e:GetHandler():GetSequence()
return not (Doremy_Summoning_Check or Doremy_Chain_Solving_Check or Doremy_Token_Check) and (cm.spcheck(tp,seq) or cm.spcheck(1-tp,4-seq)) and not ((ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or ph==PHASE_DAMAGE_CAL)
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
local seq=c:GetSequence()
if (Doremy_Summoning_Check or Doremy_Chain_Solving_Check or Doremy_Token_Check) or not (cm.spcheck(tp,seq) or cm.spcheck(1-tp,4-seq)) or ((ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or ph==PHASE_DAMAGE_CAL) or c:GetFlagEffect(m+50)>0 then return end
Duel.HintSelection(Group.FromCards(c))
cm.sp(c,tp,c:GetSequence())
cm.sp(c,1-tp,4-c:GetSequence())
Duel.SpecialSummonComplete()
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
c:RegisterFlagEffect(m+50,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.spcheck(tp,seq)
return SNNM.DressamLocCheck(tp,tp,1<<seq) and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0x9538,TYPES_TOKEN_MONSTER,2600,3600,5,RACE_FIEND,ATTRIBUTE_WIND,POS_FACEUP,tp,0,1<<seq)
......
......@@ -12,8 +12,6 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.adjustcon)
e2:SetOperation(cm.adjustop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
......@@ -76,18 +74,16 @@ end
function cm.creset(e,tp,eg,ep,ev,re,r,rp)
Doremy_Chain_Solving_Check=false
end
function cm.adjustcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local seq=e:GetHandler():GetSequence()
return not (Doremy_Summoning_Check or Doremy_Chain_Solving_Check or Doremy_Token_Check) and (cm.spcheck(tp,seq) or cm.spcheck(1-tp,4-seq)) and not ((ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or ph==PHASE_DAMAGE_CAL)
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
local seq=c:GetSequence()
if (Doremy_Summoning_Check or Doremy_Chain_Solving_Check or Doremy_Token_Check) or not (cm.spcheck(tp,seq) or cm.spcheck(1-tp,4-seq)) or ((ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or ph==PHASE_DAMAGE_CAL) or c:GetFlagEffect(m+50)>0 then return end
Duel.HintSelection(Group.FromCards(c))
cm.sp(c,tp,c:GetSequence())
cm.sp(c,1-tp,4-c:GetSequence())
Duel.SpecialSummonComplete()
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
c:RegisterFlagEffect(m+50,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.spcheck(tp,seq)
return SNNM.DressamLocCheck(tp,tp,1<<seq) and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0x9538,TYPES_TOKEN_MONSTER,2300,3900,6,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,tp,0,1<<seq)
......
......@@ -4,7 +4,6 @@ cm.name="梦的委托者 探女"
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
......
......@@ -88,6 +88,7 @@ function c91000333.spcop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0)
e2:SetValue(c91000333.actlimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c91000333.actlimit(e,re,tp)
......
......@@ -85,7 +85,8 @@ function c91000334.spcop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(c91000334.actlimit)
Duel.RegisterEffect(e2,tp)
end
......
......@@ -120,7 +120,8 @@ function c91000335.spcop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(c91000335.actlimit)
Duel.RegisterEffect(e2,tp)
end
......
......@@ -79,7 +79,8 @@ function c91000336.spcop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(c91000336.actlimit)
Duel.RegisterEffect(e2,tp)
end
......
......@@ -77,7 +77,8 @@ function c91000337.spcop(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetValue(c91000337.actlimit)
Duel.RegisterEffect(e2,tp)
......@@ -185,7 +186,7 @@ function c91000337.filter2(c)
end
function c91000337.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c91000337.filter2(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c91000337.filters,tp,LOCATION_ONFIELD,0,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c91000337.filters,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
local ct=Duel.GetMatchingGroupCount(c91000337.filters,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......
......@@ -73,7 +73,8 @@ function c91000338.spcop(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetValue(c91000338.actlimit)
Duel.RegisterEffect(e2,tp)
......
......@@ -85,7 +85,8 @@ function c91000339.spcop(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetValue(c91000339.actlimit)
Duel.RegisterEffect(e2,tp)
......
......@@ -98,7 +98,8 @@ function c91000340.spcop(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetValue(c91000340.actlimit)
Duel.RegisterEffect(e2,tp)
......
......@@ -2,91 +2,93 @@
local m=91020017
local cm=c91020017
function c91020017.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m*3)
e1:SetCondition(cm.con1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_FLIP)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.tg2)
e2:SetCountLimit(1,m)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCategory(CATEGORY_RELEASE)
e3:SetCode(EVENT_RELEASE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_FLIP)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetOperation(cm.flipop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCategory(CATEGORY_SEARCH)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,m*2)
e5:SetCondition(cm.condition)
e5:SetTarget(cm.tg5)
e5:SetOperation(cm.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(91020017,ACTIVITY_SPSUMMON,cm.counterfilter)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e1:SetCountLimit(1,m*3)
e1:SetCondition(cm.con1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_FLIP)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.tg2)
e2:SetCountLimit(1,m)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCategory(CATEGORY_RELEASE)
e3:SetCode(EVENT_RELEASE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_FLIP)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetOperation(cm.flipop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCategory(CATEGORY_SEARCH)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,m*2)
e5:SetCondition(cm.condition)
e5:SetTarget(cm.tg5)
e5:SetOperation(cm.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(91020017,ACTIVITY_SPSUMMON,cm.counterfilter)
end
--e4
function cm.counterfilter(c)
return c:IsSetCard(0x9d0) or c:IsSetCard(0x9d1)
return c:IsSetCard(0x9d0) or c:IsSetCard(0x9d1)
end
function cm.flipop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(91020017,RESET_EVENT+RESETS_STANDARD,0,1)
e:GetHandler():RegisterFlagEffect(91020017,RESET_EVENT+RESETS_STANDARD,0,1)
end
--e1
function cm.tag(e,c)
return not (c:IsSetCard(0x9d0) or c:IsSetCard(0x9d1))
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetCurrentChain()<1 and Duel.GetTurnPlayer()==tp and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_EXTRA,0)==0 and Duel.GetCustomActivityCount(91020017,tp,ACTIVITY_SPSUMMON)==0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
function cm.con1(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_EXTRA,0)==0 and Duel.GetCustomActivityCount(91020017,tp,ACTIVITY_SPSUMMON)==0
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.tag)
Duel.RegisterEffect(e1,tp)
local c=e:GetHandler()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.tag)
Duel.RegisterEffect(e1,tp)
local c=e:GetHandler()
Duel.ConfirmCards(1-tp,c)
end
--e2
function cm.fit(c,e,tp)
return c:IsSetCard(0x9d1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x9d1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.fit,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.fit,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.fit,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.fit,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,g)
end
end
--e5
function cm.fit2(c,e,tp)
return c:IsSetCard(0x9d0) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x9d0) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -99,32 +101,32 @@ end
function cm.op5(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(cm.fit2,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local tc=sg:GetFirst()
tc:RegisterFlagEffect(91000001,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc)
e2:SetCondition(cm.descon)
e2:SetOperation(cm.desop)
Duel.RegisterEffect(e2,tp)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local tc=sg:GetFirst()
tc:RegisterFlagEffect(91000001,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc)
e2:SetCondition(cm.descon)
e2:SetOperation(cm.desop)
Duel.RegisterEffect(e2,tp)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(9100001)~=0 then
return true
else
e:Reset()
return false
end
local tc=e:GetLabelObject()
if tc:GetFlagEffect(9100001)~=0 then
return true
else
e:Reset()
return false
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
end
\ No newline at end of file
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