Commit fe878da8 authored by wind2009's avatar wind2009

Fix 再世 monsters

parent bc75892e
Pipeline #32434 passed with stages
in 2 minutes and 58 seconds
......@@ -27,16 +27,22 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.thcon2)
e3:SetTarget(s.thtg2)
e3:SetOperation(s.thop2)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetOperation(s.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id+o)
e4:SetCondition(s.thcon2)
e4:SetTarget(s.thtg2)
e4:SetOperation(s.thop2)
c:RegisterEffect(e4)
end
function s.cfilter(c)
return (c:GetBaseAttack()==2500 or c:GetBaseDefense()==2500) and c:IsFaceup()
......@@ -63,9 +69,13 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetTurnPlayer()==1-tp and Duel.GetTurnCount()==c:GetTurnID()
return Duel.GetTurnPlayer()==1-tp and e:GetHandler():GetFlagEffect(id)>0
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
......
......@@ -27,16 +27,22 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.thcon2)
e3:SetTarget(s.thtg2)
e3:SetOperation(s.thop2)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetOperation(s.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id+o)
e4:SetCondition(s.thcon2)
e4:SetTarget(s.thtg2)
e4:SetOperation(s.thop2)
c:RegisterEffect(e4)
end
function s.cfilter(c)
return (c:GetBaseAttack()==2500 or c:GetBaseDefense()==2500) and c:IsFaceup()
......@@ -70,9 +76,13 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(eg,REASON_EFFECT)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetTurnPlayer()==1-tp and Duel.GetTurnCount()==c:GetTurnID()
return Duel.GetTurnPlayer()==1-tp and e:GetHandler():GetFlagEffect(id)>0
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
......
......@@ -27,16 +27,22 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.thcon2)
e3:SetTarget(s.thtg2)
e3:SetOperation(s.thop2)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetOperation(s.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id+o)
e4:SetCondition(s.thcon2)
e4:SetTarget(s.thtg2)
e4:SetOperation(s.thop2)
c:RegisterEffect(e4)
end
function s.cfilter(c)
return (c:GetBaseAttack()==2500 or c:GetBaseDefense()==2500) and c:IsFaceup()
......@@ -66,9 +72,13 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetTurnPlayer()==1-tp and Duel.GetTurnCount()==c:GetTurnID()
return Duel.GetTurnPlayer()==1-tp and e:GetHandler():GetFlagEffect(id)>0
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
......
......@@ -28,16 +28,22 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id+o)
e4:SetCondition(s.thcon2)
e4:SetTarget(s.thtg2)
e4:SetOperation(s.thop2)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetOperation(s.regop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,2))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,id+o)
e5:SetCondition(s.thcon2)
e5:SetTarget(s.thtg2)
e5:SetOperation(s.thop2)
c:RegisterEffect(e5)
end
function s.spcfilter(c)
return (c:IsAttack(2500) or c:IsDefense(2500)) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
......@@ -77,9 +83,13 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetTurnPlayer()==1-tp and Duel.GetTurnCount()==c:GetTurnID()
return Duel.GetTurnPlayer()==1-tp and e:GetHandler():GetFlagEffect(id)>0
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
......
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