Commit 450195f3 authored by Vury Leo's avatar Vury Leo

Merge remote-tracking branch 'upstream/master' into merge-upstream

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