Commit 7a0a1317 authored by REIKAI's avatar REIKAI 💬

update 11.05

parent 3536f541
No preview for this file type
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsCode,23100005,23100008))
e3:SetValue(800)
......@@ -33,14 +33,14 @@ function cm.initial_effect(c)
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--counter
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e10:SetCode(EVENT_CHAINING)
e10:SetProperty(EFFECT_FLAG_DELAY)
e10:SetRange(LOCATION_SZONE)
e10:SetCondition(cm.condition)
e10:SetOperation(cm.counter)
c:RegisterEffect(e10)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e11:SetCode(EVENT_CHAINING)
e11:SetProperty(EFFECT_FLAG_DELAY)
e11:SetRange(LOCATION_SZONE)
e11:SetCondition(cm.condition)
e11:SetOperation(cm.counter)
c:RegisterEffect(e11)
--immune
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
......@@ -94,7 +94,7 @@ function cm.initial_effect(c)
e9:SetType(EFFECT_TYPE_QUICK_O)
e9:SetCode(EVENT_FREE_CHAIN)
e9:SetRange(LOCATION_SZONE)
e9:SetCountLimit(1,m+EFFECT_COUNT_CODE_SINGLE)
e9:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e9:SetCost(cm.ctcost(5))
e9:SetTarget(cm.target)
e9:SetOperation(cm.activate)
......@@ -207,12 +207,14 @@ function cm.atkfilter(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc,race)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,cm.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
if tc then
local og=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local mg,matk=og:GetMaxGroup(Card.GetAttack)
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -221,6 +223,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(matk)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_ATTACK_ALL)
......
......@@ -102,6 +102,9 @@ function cm.recost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not (c:IsSetCard(0x3f71))
end
function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0
end
......
......@@ -11,9 +11,9 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.discon)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
e1:SetCondition(cm.discon1)
e1:SetTarget(cm.distg1)
e1:SetOperation(cm.disop1)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
......@@ -50,14 +50,14 @@ function cm.initial_effect(c)
e4:SetCondition(cm.actcon)
c:RegisterEffect(e4)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
function cm.discon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.distg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,5)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
function cm.disop1(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,5,REASON_EFFECT)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
......
......@@ -18,7 +18,7 @@ function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsCode,23100005,23100008))
e3:SetValue(300)
......
......@@ -71,7 +71,7 @@ end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.spfilter2(c)
function cm.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -8,6 +8,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.tdtg)
e1:SetOperation(s.tdop)
c:RegisterEffect(e1)
......
......@@ -361,7 +361,7 @@ function h_star.copy(e,c,id)
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
--------------extra-----------------
function cm.accost5(e,tp,eg,ep,ev,re,r,rp,chk)
function h_star.accost5(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
......@@ -374,7 +374,7 @@ function h_star.effect5(c,id)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCost(cm.accost5)
e1:SetCost(h_star.accost5)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
......@@ -392,7 +392,7 @@ function h_star.effect5(c,id)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(cm.accost5)
e2:SetCost(h_star.accost5)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
......@@ -432,7 +432,7 @@ function h_star.effect5(c,id)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCost(cm.accost5)
e3:SetCost(h_star.accost5)
e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(function (c)
return c:IsFaceup() and c:IsCanTurnSet()
......@@ -456,7 +456,7 @@ end,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCost(cm.accost5)
e4:SetCost(h_star.accost5)
e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
......@@ -475,7 +475,7 @@ end,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCost(cm.accost5)
e5:SetCost(h_star.accost5)
e5:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(function (c)
return c:IsSetCard(0x5b82) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
......
......@@ -57,9 +57,9 @@ function cm.AllGlobalCheck(c)
end
cm[4]=Duel.SendtoGrave
Duel.SendtoGrave=function(target,reason)
if reason&REASON_RULE==0 then
if reason&REASON_RULE~=0 then
local tg=Group.__add(target,target)
local g=tg:Filter(function(c)return c:IsLocation(LOCATION_OVERLAY) and c.main_peacecho and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:IsAbleToDeck()end,nil)
local g=tg:Filter(function(c)return c.main_peacecho and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:IsAbleToDeck()end,nil)
for tc in aux.Next(g) do
Duel.Hint(HINT_CARD,0,tc:GetOriginalCodeRule())
Duel.SendtoDeck(tc,nil,1,reason)
......@@ -159,6 +159,15 @@ function cm.Peacecho(c,typ)
e6:SetTarget(cm.PeacechoDrawTarget3)
e6:SetOperation(cm.PeacechoDrawOperation3)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_ACTIVATE_COST)
e7:SetRange(LOCATION_FZONE)
e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e7:SetTargetRange(1,0)
e7:SetTarget(cm.Peacechofieldcosttg)
e7:SetOperation(cm.Peacechofieldcostop)
c:RegisterEffect(e7)
end
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -167,6 +176,13 @@ function cm.Peacecho(c,typ)
e9:SetOperation(cm.UpRegi)
c:RegisterEffect(e9)
end
function cm.Peacechofieldcosttg(e,te,tp)
return te:IsActiveType(TYPE_FIELD) and te:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function cm.Peacechofieldcostop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_RULE)
e:GetHandler():ReverseInDeck()
end
function cm.RePeacechotg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsLocation(LOCATION_DECK) and c:GetDestination()==LOCATION_GRAVE and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:IsAbleToDeck() end
......
local m=53707012
local cm=_G["c"..m]
cm.name="清响未完篇 天涣霄世礼"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_DECKDES)
......
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