Commit f22039ce authored by DailyShana's avatar DailyShana

fix

the effect desc of 宝玉の集結/Crystal Hoard changed
parent 136fb922
......@@ -7,7 +7,7 @@ function c30398342.initial_effect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--spsummon
--Activate(spsummon)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30398342,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -61,6 +61,7 @@ function c30398342.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c30398342.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c30398342.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e)
......
--アモルファージ・ライシス
function c47598941.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DELAYED_QUICKEFFECT)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(47598941,0))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e0:SetHintTiming(TIMING_DAMAGE_STEP)
e0:SetCondition(c47598941.condition)
c:RegisterEffect(e0)
--Activate(set p)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47598941,1))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DESTROY,TIMING_DESTROY)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetTarget(c47598941.target1)
e1:SetOperation(c47598941.operation)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,47598941)
e1:SetCondition(c47598941.setcon)
e1:SetTarget(c47598941.settg1)
e1:SetOperation(c47598941.setop)
c:RegisterEffect(e1)
--set p
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47598941,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,47598941)
e2:SetCondition(c47598941.condition)
e2:SetTarget(c47598941.target2)
e2:SetOperation(c47598941.operation)
e2:SetCondition(c47598941.setcon)
e2:SetTarget(c47598941.settg2)
e2:SetOperation(c47598941.setop)
c:RegisterEffect(e2)
--atk/def down
local e3=Effect.CreateEffect(c)
......@@ -33,37 +46,31 @@ function c47598941.initial_effect(c)
e4:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e4)
end
function c47598941.filter(c)
return c:IsSetCard(0xe0) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
function c47598941.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c47598941.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_SZONE) and (c:GetPreviousSequence()==6 or c:GetPreviousSequence()==7) and c:GetPreviousControler()==tp
end
function c47598941.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_DESTROYED,true)
if res
and Duel.GetFlagEffect(tp,47598941)==0
and Duel.IsExistingMatchingCard(c47598941.filter,tp,LOCATION_DECK,0,1,nil)
and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7))
and teg:IsExists(c47598941.cfilter,1,nil,tp)
and Duel.SelectYesNo(tp,94) then
Duel.RegisterFlagEffect(tp,47598941,RESET_PHASE+PHASE_END,0,1)
end
end
function c47598941.condition(e,tp,eg,ep,ev,re,r,rp)
function c47598941.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c47598941.cfilter,1,nil,tp)
end
function c47598941.target2(e,tp,eg,ep,ev,re,r,rp,chk)
function c47598941.filter(c)
return c:IsSetCard(0xe0) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c47598941.settg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7))
and Duel.IsExistingMatchingCard(c47598941.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c47598941.settg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e)
and Duel.GetFlagEffect(tp,47598941)==0
and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7))
and Duel.IsExistingMatchingCard(c47598941.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.RegisterFlagEffect(tp,47598941,RESET_PHASE+PHASE_END,0,1)
end
function c47598941.operation(e,tp,eg,ep,ev,re,r,rp)
function c47598941.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetFlagEffect(tp,47598941)==0 then return end
if not c:IsRelateToEffect(e) then return end
if not (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c47598941.filter,tp,LOCATION_DECK,0,1,1,nil)
......
--EMリバイバル
function c5672432.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DELAYED_QUICKEFFECT)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c5672432.condition)
e1:SetTarget(c5672432.target)
e1:SetOperation(c5672432.operation)
......
......@@ -54,7 +54,7 @@ function c69868555.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c69868555.filter(c,e)
return c:IsFaceup() and not c:IsPreviousLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsPreviousLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e)
end
function c69868555.disop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
......
--宝玉の集結
function c87259933.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DELAYED_QUICKEFFECT)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(87259933,0))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Activate(spsummon)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87259933,1))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DESTROY)
e1:SetCondition(c87259933.spcon1)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c87259933.spcon)
e1:SetCost(c87259933.spcost)
e1:SetTarget(c87259933.sptg1)
e1:SetOperation(c87259933.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(87259933,0))
e2:SetDescription(aux.Stringid(87259933,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c87259933.spcon2)
e2:SetCondition(c87259933.spcon)
e2:SetCost(c87259933.spcost)
e2:SetTarget(c87259933.sptg2)
e2:SetOperation(c87259933.spop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(87259933,1))
e3:SetDescription(aux.Stringid(87259933,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
......@@ -41,30 +49,7 @@ function c87259933.cfilter(c,tp)
return c:IsSetCard(0x1034) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
end
function c87259933.spcon1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentPhase()~=PHASE_DAMAGE then return true end
local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_DESTROYED,true)
return res and teg:IsExists(c87259933.cfilter,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c87259933.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
function c87259933.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_DESTROYED,true)
if Duel.GetCurrentPhase()==PHASE_DAMAGE
or (res and teg:IsExists(c87259933.cfilter,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c87259933.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(87259933,2))) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
e:GetHandler():RegisterFlagEffect(87259933,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(87259933,3))
else
e:SetCategory(0)
end
end
function c87259933.spcon2(e,tp,eg,ep,ev,re,r,rp)
function c87259933.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c87259933.cfilter,1,nil,tp)
end
function c87259933.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -74,6 +59,12 @@ end
function c87259933.filter(c,e,tp)
return c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c87259933.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c87259933.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c87259933.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -81,7 +72,6 @@ function c87259933.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c87259933.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(87259933)==0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c87259933.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
......
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