Commit e2a140b0 authored by wind2009's avatar wind2009

Merge branch 'master' into 888_master

parents 28416424 913e83a4
......@@ -28,6 +28,7 @@ end
function c11475049.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousControler(tp)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c11475049.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -31,6 +31,7 @@ end
function c12697630.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousControler(tp)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c12697630.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -18,11 +18,11 @@ function c1475311.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c1475311.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
Duel.ShuffleHand(p)
if Duel.Draw(p,d,REASON_EFFECT)<=0 then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(p,Card.IsAttribute,p,LOCATION_HAND,0,1,1,nil,ATTRIBUTE_DARK)
Duel.ShuffleHand(p)
local tg=g:GetFirst()
if tg then
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)==0 then
......
......@@ -27,8 +27,9 @@ end
function c19403423.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19403423,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c19403423.aclimit)
......
......@@ -28,6 +28,7 @@ end
function c20292186.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousControler(tp)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c20292186.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -75,6 +75,7 @@ function s.rmcon(fid)
end
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local tc=e:GetLabelObject()
if tc and tc:IsOnField() then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
......
......@@ -97,6 +97,6 @@ function c24104865.desfilter(c,rc)
return c:GetFlagEffect(24104865)~=0 and rc:IsRelateToCard(c)
end
function c24104865.desop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(c24104865.desfilter,tp,LOCATION_MZONE,0,nil,e:GetHandler())
local dg=Duel.GetMatchingGroup(c24104865.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
Duel.Destroy(dg,REASON_EFFECT)
end
......@@ -38,8 +38,9 @@ function c24940422.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(p,d,REASON_EFFECT)
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(24940422,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c24940422.aclimit)
......
......@@ -31,6 +31,7 @@ end
function c34267821.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousControler(tp)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c34267821.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--皆既日蝕の書
function c35480699.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c35480699.target)
e1:SetOperation(c35480699.activate)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function c35480699.target(e,tp,eg,ep,ev,re,r,rp,chk)
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c35480699.activate(e,tp,eg,ep,ev,re,r,rp)
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
......@@ -25,14 +26,15 @@ function c35480699.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(c35480699.flipcon)
e1:SetOperation(c35480699.flipop)
e1:SetCondition(s.flipcon)
e1:SetOperation(s.flipop)
Duel.RegisterEffect(e1,tp)
end
function c35480699.flipcon(e,tp,eg,ep,ev,re,r,rp)
function s.flipcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_MZONE,1,nil)
end
function c35480699.flipop(e,tp,eg,ep,ev,re,r,rp)
function s.flipop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil)
local ct=Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
Duel.BreakEffect()
......
......@@ -3,6 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
......@@ -37,8 +38,9 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
end
if e:GetLabel()==100 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
......
......@@ -31,6 +31,7 @@ end
function c47863787.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousControler(tp)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c47863787.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -30,6 +30,7 @@ end
function c48086335.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousControler(tp)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c48086335.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--ワンチャン!?
function c51405049.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c51405049.condition)
e1:SetTarget(c51405049.target)
e1:SetOperation(c51405049.activate)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function c51405049.cfilter(c)
function s.cfilter(c)
return c:IsFaceup() and c:IsLevel(1)
end
function c51405049.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c51405049.cfilter,tp,LOCATION_MZONE,0,1,nil)
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c51405049.filter(c)
function s.filter(c)
return c:IsLevel(1) and c:IsAbleToHand()
end
function c51405049.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c51405049.filter,tp,LOCATION_DECK,0,1,nil) end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c51405049.activate(e,tp,eg,ep,ev,re,r,rp)
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c51405049.filter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c51405049.regop)
e1:SetOperation(s.regop)
e1:SetLabel(g:GetFirst():GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
......@@ -40,23 +41,24 @@ function c51405049.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c51405049.damcon)
e2:SetOperation(c51405049.damop)
e2:SetCondition(s.damcon)
e2:SetOperation(s.damop)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp)
end
end
function c51405049.regop(e,tp,eg,ep,ev,re,r,rp)
function s.regop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then return end
local tc=eg:GetFirst()
if tc:IsSummonPlayer(tp) and tc:IsCode(e:GetLabel()) then
e:SetLabel(0)
end
end
function c51405049.damcon(e,tp,eg,ep,ev,re,r,rp)
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()~=0
end
function c51405049.damop(e,tp,eg,ep,ev,re,r,rp)
function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Damage(tp,2000,REASON_EFFECT)
end
......@@ -60,6 +60,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
......
--命削りの宝札
function c59750328.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,59750328+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c59750328.cost)
e1:SetTarget(c59750328.target)
e1:SetOperation(c59750328.activate)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function c59750328.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -21,13 +22,13 @@ function c59750328.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c59750328.target(e,tp,eg,ep,ev,re,r,rp,chk)
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=3-Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,0,e:GetHandler())
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c59750328.activate(e,tp,eg,ep,ev,re,r,rp)
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=3-Duel.GetFieldGroupCount(p,LOCATION_HAND,0)
if ct>0 then
......@@ -52,10 +53,11 @@ function c59750328.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetOperation(c59750328.tgop)
e3:SetOperation(s.tgop)
Duel.RegisterEffect(e3,p)
end
function c59750328.tgop(e,tp,eg,ep,ev,re,r,rp)
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local g=Duel.GetFieldGroup(e:GetOwnerPlayer(),LOCATION_HAND,0)
Duel.SendtoGrave(g,REASON_EFFECT)
end
--青眼の精霊龍
function c59822133.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0xdd),1)
c:EnableReviveLimit()
--special summon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(59822133)
e1:SetCode(id)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(59822133,0))
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c59822133.negcon)
e2:SetTarget(c59822133.negtg)
e2:SetOperation(c59822133.negop)
e2:SetCondition(s.negcon)
e2:SetTarget(s.negtg)
e2:SetOperation(s.negop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(59822133,1))
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(c59822133.spcon)
e3:SetCost(c59822133.spcost)
e3:SetTarget(c59822133.sptg)
e3:SetOperation(c59822133.spop)
e3:SetCondition(s.spcon)
e3:SetCost(s.spcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function c59822133.negcon(e,tp,eg,ep,ev,re,r,rp)
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetActivateLocation()==LOCATION_GRAVE and Duel.IsChainNegatable(ev)
end
function c59822133.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c59822133.negop(e,tp,eg,ep,ev,re,r,rp)
function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function c59822133.spcon(e,tp,eg,ep,ev,re,r,rp)
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c59822133.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c59822133.spfilter(c,e,tp,mc)
function s.spfilter(c,e,tp,mc)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_SYNCHRO)
and not c:IsCode(59822133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c59822133.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c59822133.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c59822133.spop(e,tp,eg,ep,ev,re,r,rp)
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c59822133.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(59822133,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
......@@ -79,16 +80,17 @@ function c59822133.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(c59822133.descon)
e1:SetOperation(c59822133.desop)
e1:SetCondition(s.descon)
e1:SetOperation(s.desop)
Duel.RegisterEffect(e1,tp)
end
end
function c59822133.descon(e,tp,eg,ep,ev,re,r,rp)
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:GetFlagEffectLabel(59822133)==e:GetLabel()
return tc:GetFlagEffectLabel(id)==e:GetLabel()
end
function c59822133.desop(e,tp,eg,ep,ev,re,r,rp)
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
......@@ -74,6 +74,7 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
else return true end
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.SendtoGrave(e:GetLabelObject(),REASON_EFFECT)
end
function s.splimit(e,c)
......
--星遺物の機憶
function c68191756.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,68191756+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c68191756.target)
e1:SetOperation(c68191756.activate)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function c68191756.filter(c,e,tp)
function s.filter(c,e,tp)
return c:IsSetCard(0x10c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c68191756.target(e,tp,eg,ep,ev,re,r,rp,chk)
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c68191756.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c68191756.activate(e,tp,eg,ep,ev,re,r,rp)
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(c)
......@@ -27,17 +28,17 @@ function c68191756.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c68191756.splimit)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c68191756.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local fid=c:GetFieldID()
tc:RegisterFlagEffect(68191756,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......@@ -45,25 +46,26 @@ function c68191756.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetCountLimit(1)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c68191756.thcon)
e3:SetOperation(c68191756.thop)
e3:SetCondition(s.thcon)
e3:SetOperation(s.thop)
Duel.RegisterEffect(e3,tp)
end
Duel.SpecialSummonComplete()
end
function c68191756.splimit(e,c)
function s.splimit(e,c)
return not c:IsSetCard(0x10c)
end
function c68191756.thcon(e,tp,eg,ep,ev,re,r,rp)
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(68191756)==e:GetLabel() then
if tc:GetFlagEffectLabel(id)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function c68191756.thop(e,tp,eg,ep,ev,re,r,rp)
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
......@@ -39,6 +39,7 @@ end
function c69304426.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousControler(tp)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c69304426.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--魔獣の懐柔
function c72537897.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c72537897.condition)
e1:SetTarget(c72537897.target)
e1:SetOperation(c72537897.activate)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function c72537897.condition(e,tp,eg,ep,ev,re,r,rp)
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c72537897.spfilter(c,e,tp)
function s.spfilter(c,e,tp)
return c:IsRace(RACE_BEAST) and c:IsLevelBelow(2) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c72537897.target(e,tp,eg,ep,ev,re,r,rp,chk)
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c72537897.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and g:GetClassCount(Card.GetCode)>=3 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_DECK)
end
function c72537897.activate(e,tp,eg,ep,ev,re,r,rp)
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c72537897.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>2
and g:GetClassCount(Card.GetCode)>=3 then
......@@ -35,7 +36,7 @@ function c72537897.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=sg1:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(72537897,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
......@@ -57,8 +58,8 @@ function c72537897.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetCountLimit(1)
e3:SetLabel(fid)
e3:SetLabelObject(sg1)
e3:SetCondition(c72537897.descon)
e3:SetOperation(c72537897.desop)
e3:SetCondition(s.descon)
e3:SetOperation(s.desop)
Duel.RegisterEffect(e3,tp)
Duel.SpecialSummonComplete()
end
......@@ -68,27 +69,28 @@ function c72537897.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c72537897.splimit)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c72537897.splimit(e,c)
function s.splimit(e,c)
return c:GetRace()~=RACE_BEAST
end
function c72537897.desfilter(c,fid)
return c:GetFlagEffectLabel(72537897)==fid
function s.desfilter(c,fid)
return c:GetFlagEffectLabel(id)==fid
end
function c72537897.descon(e,tp,eg,ep,ev,re,r,rp)
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c72537897.desfilter,1,nil,e:GetLabel()) then
if not g:IsExists(s.desfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c72537897.desop(e,tp,eg,ep,ev,re,r,rp)
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local g=e:GetLabelObject()
local tg=g:Filter(c72537897.desfilter,nil,e:GetLabel())
local tg=g:Filter(s.desfilter,nil,e:GetLabel())
Duel.Destroy(tg,REASON_EFFECT)
end
......@@ -54,7 +54,8 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
local c=e:GetHandler()
return Duel.GetTurnPlayer()==1-tp and c:IsPreviousControler(tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -32,6 +32,7 @@ end
function c80237445.spcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousControler(tp)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c80237445.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
......
--BF-毒風のシムーン
function c81470373.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--search and normal summon / gy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81470373,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,81470373)
e1:SetCondition(c81470373.sumcon)
e1:SetCost(c81470373.sumcost)
e1:SetTarget(c81470373.sumtg)
e1:SetOperation(c81470373.sumop)
e1:SetCountLimit(1,id)
e1:SetCondition(s.sumcon)
e1:SetCost(s.sumcost)
e1:SetTarget(s.sumtg)
e1:SetOperation(s.sumop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c81470373.ntcon)
e2:SetCondition(s.ntcon)
e2:SetValue(SUMMON_TYPE_NORMAL)
c:RegisterEffect(e2)
e1:SetLabelObject(e2)
end
function c81470373.ntcon(e,c,minc)
function s.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.CheckTribute(c,0)
end
function c81470373.sumcon(e,tp,eg,ep,ev,re,r,rp)
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c81470373.cfilter(c)
function s.cfilter(c)
return c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c81470373.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c81470373.cfilter,tp,LOCATION_HAND,0,1,c) end
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c81470373.cfilter,tp,LOCATION_HAND,0,1,1,c)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c81470373.acfilter(c,tp)
function s.acfilter(c,tp)
return c:IsCode(91351370) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c81470373.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0
or not Duel.IsExistingMatchingCard(c81470373.acfilter,tp,LOCATION_DECK,0,1,nil,tp) then return false end
or not Duel.IsExistingMatchingCard(s.acfilter,tp,LOCATION_DECK,0,1,nil,tp) then return false end
return e:GetHandler():IsSummonable(true,e:GetLabelObject()) or e:GetHandler():IsAbleToGrave()
end
end
function c81470373.sumop(e,tp,eg,ep,ev,re,r,rp)
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c81470373.splimit)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c81470373.acfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
local tc=Duel.SelectMatchingCard(tp,s.acfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -68,7 +69,7 @@ function c81470373.sumop(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetOperation(c81470373.tgop)
e1:SetOperation(s.tgop)
tc:RegisterEffect(e1)
if not c:IsRelateToEffect(e) then return end
local se=e:GetLabelObject()
......@@ -82,10 +83,11 @@ function c81470373.sumop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c81470373.splimit(e,c)
function s.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK) and c:IsLocation(LOCATION_EXTRA)
end
function c81470373.tgop(e,tp,eg,ep,ev,re,r,rp)
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local c=e:GetHandler()
if Duel.SendtoGrave(c,REASON_EFFECT)~=0 then
Duel.Damage(tp,1000,REASON_EFFECT)
......
......@@ -27,8 +27,9 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
......
......@@ -76,6 +76,7 @@ function s.tdcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(id)~=0
end
function s.tdop3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local tc=e:GetLabelObject()
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
......
......@@ -32,6 +32,7 @@ end
function c84268896.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousControler(tp)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c84268896.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -28,6 +28,7 @@ end
function c85080444.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousControler(tp)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c85080444.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -31,6 +31,7 @@ end
function c85103922.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousControler(tp)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c85103922.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -95,6 +95,7 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(id)~=0
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local tc=e:GetLabelObject()
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
......@@ -32,6 +32,7 @@ end
function c8873112.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousControler(tp)
and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp
end
function c8873112.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--無の煉獄
function c93946239.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c93946239.condition)
e1:SetTarget(c93946239.target)
e1:SetOperation(c93946239.activate)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function c93946239.condition(e,tp,eg,ep,ev,re,r,rp)
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>2
end
function c93946239.target(e,tp,eg,ep,ev,re,r,rp,chk)
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c93946239.activate(e,tp,eg,ep,ev,re,r,rp)
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -28,10 +29,11 @@ function c93946239.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c93946239.disop)
e1:SetOperation(s.disop)
Duel.RegisterEffect(e1,p)
end
function c93946239.disop(e,tp,eg,ep,ev,re,r,rp)
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local g=Duel.GetFieldGroup(e:GetOwnerPlayer(),LOCATION_HAND,0)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
end
......@@ -39,8 +39,9 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
end
if e:GetLabel()==100 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
......
--天獄の王
function c9822220.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--public
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9822220,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9822220)
e1:SetOperation(c9822220.operation)
e1:SetCountLimit(1,id)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9822220,1))
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,9822220)
e2:SetCondition(c9822220.spcon)
e2:SetTarget(c9822220.sptg)
e2:SetOperation(c9822220.spop)
e2:SetCountLimit(1,id)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function c9822220.operation(e,tp,eg,ep,ev,re,r,rp)
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local fid=c:GetFieldID()
c:RegisterFlagEffect(9822220,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,EFFECT_FLAG_CLIENT_HINT,1,fid,66)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,EFFECT_FLAG_CLIENT_HINT,1,fid,66)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
......@@ -39,24 +40,24 @@ function c9822220.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetLabel(fid)
e2:SetLabelObject(c)
e2:SetCondition(c9822220.indcon)
e2:SetTarget(c9822220.indtg)
e2:SetCondition(s.indcon)
e2:SetTarget(s.indtg)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e2,tp)
end
function c9822220.indcon(e)
function s.indcon(e)
local c=e:GetLabelObject()
return c:GetFlagEffectLabel(9822220)==e:GetLabel()
return c:GetFlagEffectLabel(id)==e:GetLabel()
end
function c9822220.indtg(e,c)
function s.indtg(e,c)
return c:IsFacedown()
end
function c9822220.spcon(e,tp,eg,ep,ev,re,r,rp)
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
and not re:GetHandler():IsStatus(STATUS_ACT_FROM_HAND)
end
function c9822220.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
......@@ -67,20 +68,20 @@ function c9822220.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(0)
end
end
function c9822220.setfilter(c)
function s.setfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c9822220.spop(e,tp,eg,ep,ev,re,r,rp)
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local g=Duel.GetMatchingGroup(c9822220.setfilter,tp,LOCATION_DECK,0,nil)
if e:GetLabel()==1 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9822220,2)) then
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil)
if e:GetLabel()==1 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
Duel.SSet(tp,sg)
local tc=sg:GetFirst()
tc:RegisterFlagEffect(9822220,RESET_EVENT+RESETS_REDIRECT,0,1)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_REDIRECT,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
......@@ -89,22 +90,23 @@ function c9822220.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabel(Duel.GetTurnCount()+1)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetCondition(c9822220.rmcon)
e1:SetOperation(c9822220.rmop)
e1:SetCondition(s.rmcon)
e1:SetOperation(s.rmop)
Duel.RegisterEffect(e1,tp)
end
end
end
function c9822220.rmcon(e,tp,eg,ep,ev,re,r,rp)
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(9822220)~=0 then
if tc:GetFlagEffect(id)~=0 then
return Duel.GetTurnCount()==e:GetLabel()
else
e:Reset()
return false
end
end
function c9822220.rmop(e,tp,eg,ep,ev,re,r,rp)
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
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