Commit def30bc8 authored by Nemo Ma's avatar Nemo Ma

fix

parent 2da01cd1
......@@ -23,8 +23,8 @@ function c10105580.initial_effect(c)
e3:SetCode(EVENT_PHASE+PHASE_DRAW)
e3:SetCountLimit(1,10105580)
e3:SetCondition(c10105580.spcon)
e3:SetTarget(c10105580.sptg)
e3:SetOperation(c10105580.spop)
e3:SetTarget(c10105580.sptg2)
e3:SetOperation(c10105580.spop2)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--search
......@@ -70,13 +70,13 @@ function c10105580.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and c:GetFlagEffect(10105580)>0
end
function c10105580.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c10105580.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:ResetFlagEffect(10105580)
end
function c10105580.spop(e,tp,eg,ep,ev,re,r,rp)
function c10105580.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -24,8 +24,8 @@ function c10105581.initial_effect(c)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCountLimit(1,10105581)
e3:SetCondition(c10105581.spcon)
e3:SetTarget(c10105581.sptg)
e3:SetOperation(c10105581.spop)
e3:SetTarget(c10105581.sptg2)
e3:SetOperation(c10105581.spop2)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--disable
......@@ -71,13 +71,13 @@ function c10105581.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and c:GetFlagEffect(10105581)>0
end
function c10105581.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c10105581.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:ResetFlagEffect(10105581)
end
function c10105581.spop(e,tp,eg,ep,ev,re,r,rp)
function c10105581.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -24,8 +24,8 @@ function c10105582.initial_effect(c)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e3:SetCountLimit(1,10105582)
e3:SetCondition(c10105582.spcon)
e3:SetTarget(c10105582.sptg)
e3:SetOperation(c10105582.spop)
e3:SetTarget(c10105582.sptg2)
e3:SetOperation(c10105582.spop2)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--activate limit
......@@ -43,10 +43,10 @@ function c10105582.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsLevelAbove(10) and c:IsAbleToRemoveAsCost()
end
function c10105582.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c10105582.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local c=e:GetHandler()
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c10105582.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
......@@ -68,13 +68,13 @@ function c10105582.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and c:GetFlagEffect(10105582)>0
end
function c10105582.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c10105582.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:ResetFlagEffect(10105582)
end
function c10105582.spop(e,tp,eg,ep,ev,re,r,rp)
function c10105582.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -24,8 +24,8 @@ function c10105583.initial_effect(c)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1,10105583)
e3:SetCondition(c10105583.spcon)
e3:SetTarget(c10105583.sptg)
e3:SetOperation(c10105583.spop)
e3:SetTarget(c10105583.sptg2)
e3:SetOperation(c10105583.spop2)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--remove
......@@ -67,13 +67,13 @@ function c10105583.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and c:GetFlagEffect(10105583)>0
end
function c10105583.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c10105583.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:ResetFlagEffect(10105583)
end
function c10105583.spop(e,tp,eg,ep,ev,re,r,rp)
function c10105583.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -24,8 +24,8 @@ function c10105584.initial_effect(c)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1,10105584)
e3:SetCondition(c10105584.spcon)
e3:SetTarget(c10105584.sptg)
e3:SetOperation(c10105584.spop)
e3:SetTarget(c10105584.sptg2)
e3:SetOperation(c10105584.spop2)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--remove
......@@ -80,13 +80,13 @@ function c10105584.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and c:GetFlagEffect(10105584)>0
end
function c10105584.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c10105584.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:ResetFlagEffect(10105584)
end
function c10105584.spop(e,tp,eg,ep,ev,re,r,rp)
function c10105584.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -108,7 +108,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
......
......@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
......
......@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
......
......@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
......
......@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
......
......@@ -33,7 +33,7 @@ function c40009221.initial_effect(c)
c:RegisterEffect(e3)
end
function c40009221.spcfilter(c)
return c:IsSetCard(0x107b) and not c:IsPublic()
return c:IsSetCard(0x307b) and not c:IsPublic()
end
function c40009221.spcon(e,c)
if c==nil then return true end
......
......@@ -38,7 +38,6 @@ function cm.AllGlobalCheck(c)
--end
local alle5=Effect.CreateEffect(c)
alle5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
alle5:SetRange(LOCATION_MZONE)
alle5:SetCode(EFFECT_SEND_REPLACE)
alle5:SetTarget(cm.ThirdPeacechotg)
alle5:SetValue(cm.ThirdPeacechoval)
......@@ -166,7 +165,7 @@ end
GM_global_to_deck_check=true
function cm.ThirdPeacechotgrepfilter(c)
local tp=c:GetOwner()
return c.main_peacecho and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:GetDestination()==LOCATION_GRAVE and ((c:IsLocation(LOCATION_DECK) and (Duel.GetFieldGroup(tp,LOCATION_DECK,0):GetMinGroup(Card.GetSequence):GetFirst()~=c or c:IsControler(1-tp))) or (not c:IsLocation(LOCATION_DECK) and c:IsAbleToDeck()))
return c.main_peacecho and (c:GetLeaveFieldDest()==0 and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT)) and c:GetDestination()==LOCATION_GRAVE and ((c:IsLocation(LOCATION_DECK) and (Duel.GetFieldGroup(tp,LOCATION_DECK,0):GetMinGroup(Card.GetSequence):GetFirst()~=c or c:IsControler(1-tp))) or (not c:IsLocation(LOCATION_DECK) and c:IsAbleToDeck()))
end
function cm.ThirdPeacechotg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return GM_global_to_deck_check and eg:IsExists(cm.ThirdPeacechotgrepfilter,1,nil) end
......
......@@ -70,8 +70,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(function(e,re)return re:GetHandler():GetFlagEffect(m)>0 and re:GetHandler()==e:GetLabelObject() and re:GetCode()&(EVENT_SUMMON_SUCCESS+EVENT_SPSUMMON_SUCCESS)~=0 end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.SpecialSummonComplete()
tc:CompleteProcedure()
end
Duel.SpecialSummonComplete()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -27,20 +27,41 @@ function c9910591.initial_effect(c)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_CHAIN_SOLVED)
ge2:SetCode(EVENT_CHAIN_NEGATED)
ge2:SetOperation(c9910591.checkop2)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CHAIN_SOLVED)
ge3:SetOperation(c9910591.checkop3)
Duel.RegisterEffect(ge3,0)
end
end
function c9910591.checkop1(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) or re:GetLabel()==9910591 then return end
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
if loc==LOCATION_MZONE and rc:GetFlagEffect(9910591+p)==0 then
rc:RegisterFlagEffect(9910591+p,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
if loc~=LOCATION_MZONE then return end
if rc:GetFlagEffect(9910591+p)==0 then
rc:RegisterFlagEffect(9910591+p,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1,1)
else
local flag=rc:GetFlagEffectLabel(9910591+p)
if flag then rc:SetFlagEffectLabel(9910591+p,flag+1) end
end
end
function c9910591.checkop2(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) or re:GetLabel()==9910591 then return end
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
if loc~=LOCATION_MZONE or rc:GetFlagEffect(9910591+p)==0 then return end
local flag=rc:GetFlagEffectLabel(9910591+p)
if flag==1 then
rc:ResetFlagEffect(9910591+p)
elseif flag then
rc:SetFlagEffectLabel(9910591+p,flag-1)
end
end
function c9910591.checkop3(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) or re:GetLabel()==9910591 then return end
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
......
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