Commit 480bcbf9 authored by VanillaSalt's avatar VanillaSalt

errata

parent ea1fa30b
--現世と冥界の逆転 --現世と冥界の逆転
function c17484499.initial_effect(c) function c17484499.initial_effect(c)
--Activate(summon) --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE) e1:SetHintTiming(0,TIMING_DRAW_PHASE)
e1:SetCountLimit(1,17484499+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(c17484499.condition) e1:SetCondition(c17484499.condition)
e1:SetCost(c17484499.cost) e1:SetCost(c17484499.cost)
e1:SetOperation(c17484499.activate) e1:SetOperation(c17484499.activate)
...@@ -12,10 +13,11 @@ function c17484499.initial_effect(c) ...@@ -12,10 +13,11 @@ function c17484499.initial_effect(c)
end end
function c17484499.condition(e,tp,eg,ep,ev,re,r,rp) function c17484499.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)>=15 return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)>=15
and Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>=15
end end
function c17484499.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c17484499.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) if chk==0 then return Duel.CheckLPCost(tp,1000) end
else Duel.PayLPCost(tp,1000) end Duel.PayLPCost(tp,1000)
end end
function c17484499.activate(e,tp,eg,ep,ev,re,r,rp) function c17484499.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SwapDeckAndGrave(tp) Duel.SwapDeckAndGrave(tp)
......
...@@ -12,6 +12,7 @@ function c29762407.initial_effect(c) ...@@ -12,6 +12,7 @@ function c29762407.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_SZONE,0) e2:SetTargetRange(LOCATION_SZONE,0)
e2:SetCountLimit(1,29762407)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -19,6 +20,7 @@ function c29762407.initial_effect(c) ...@@ -19,6 +20,7 @@ function c29762407.initial_effect(c)
e3:SetDescription(aux.Stringid(29762407,0)) e3:SetDescription(aux.Stringid(29762407,0))
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,29762408)
e3:SetCost(c29762407.cost) e3:SetCost(c29762407.cost)
e3:SetTarget(c29762407.target) e3:SetTarget(c29762407.target)
e3:SetOperation(c29762407.operation) e3:SetOperation(c29762407.operation)
...@@ -36,11 +38,12 @@ function c29762407.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,11 +38,12 @@ function c29762407.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c29762407.filter(c,e,tp) function c29762407.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return (c:IsLocation(LOCATION_HAND+LOCATION_DECK) or c:IsType(TYPE_FUSION))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c29762407.target(e,tp,eg,ep,ev,re,r,rp,chk) function c29762407.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29762407.filter,tp,0x43,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c29762407.filter,tp,0x43,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x32) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x43)
end end
function c29762407.operation(e,tp,eg,ep,ev,re,r,rp) function c29762407.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
...@@ -28,7 +28,7 @@ function c57728570.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,7 @@ function c57728570.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c57728570.filter(c) function c57728570.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttackAbove(1500) return c:IsType(TYPE_MONSTER) and c:IsAttackAbove(1500) and c:IsDestructable()
end end
function c57728570.activate(e,tp,eg,ep,ev,re,r,rp) function c57728570.activate(e,tp,eg,ep,ev,re,r,rp)
local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_HAND) local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_HAND)
...@@ -38,44 +38,19 @@ function c57728570.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,44 +38,19 @@ function c57728570.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
Duel.ShuffleHand(1-tp) Duel.ShuffleHand(1-tp)
end end
local g=Duel.GetMatchingGroup(c57728570.filter,1-tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(57728570,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local dg=g:Select(1-tp,1,3,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
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)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetCode(EVENT_DRAW) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetOperation(c57728570.desop) e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c57728570.turncon)
e2:SetOperation(c57728570.turnop)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e2,tp)
e2:SetLabelObject(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
c57728570[e:GetHandler()]=e2
end
function c57728570.desop(e,tp,eg,ep,ev,re,r,rp)
if ep==e:GetOwnerPlayer() then return end
local hg=eg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if hg:GetCount()==0 then return end
Duel.ConfirmCards(1-ep,hg)
local dg=hg:Filter(c57728570.filter,nil)
Duel.Destroy(dg,REASON_EFFECT)
Duel.ShuffleHand(ep)
end
function c57728570.turncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c57728570.turnop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
ct=ct+1
e:SetLabel(ct)
e:GetHandler():SetTurnCounter(ct)
if ct==3 then
e:GetLabelObject():Reset()
e:GetOwner():ResetFlagEffect(1082946)
end
end end
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
function c8131171.initial_effect(c) function c8131171.initial_effect(c)
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8131171,0))
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetDescription(aux.Stringid(8131171,0)) e1:SetCountLimit(1,8131171)
e1:SetCondition(c8131171.condition) e1:SetCondition(c8131171.condition)
e1:SetTarget(c8131171.target) e1:SetTarget(c8131171.target)
e1:SetOperation(c8131171.operation) e1:SetOperation(c8131171.operation)
...@@ -23,4 +24,23 @@ function c8131171.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,4 +24,23 @@ function c8131171.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c8131171.rmcon)
e1:SetOperation(c8131171.rmop)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
function c8131171.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c8131171.filter(c)
return c:IsCode(8131171) and c:IsAbleToRemove()
end
function c8131171.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c8131171.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
...@@ -7,28 +7,32 @@ function c83555666.initial_effect(c) ...@@ -7,28 +7,32 @@ function c83555666.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e1) e1:SetHintTiming(0,0x1e1)
e1:SetCountLimit(1,83555666+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c83555666.target) e1:SetTarget(c83555666.target)
e1:SetOperation(c83555666.activate) e1:SetOperation(c83555666.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c83555666.filter(c) function c83555666.filter(c,lp)
return c:IsFaceup() and c:IsDestructable() return c:IsFaceup() and c:IsAttackBelow(lp) and c:IsDestructable()
end end
function c83555666.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c83555666.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c83555666.filter(chkc) end local lp=Duel.GetLP(1-tp)
if chk==0 then return Duel.IsExistingTarget(c83555666.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c83555666.filter(chkc,lp) end
if chk==0 then return Duel.IsExistingTarget(c83555666.filter,tp,0,LOCATION_MZONE,1,nil,lp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c83555666.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c83555666.filter,tp,0,LOCATION_MZONE,1,1,nil,lp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0)
end end
function c83555666.activate(e,tp,eg,ep,ev,re,r,rp) function c83555666.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local atk=tc:GetAttack() local atk=tc:GetAttack()
if Duel.Destroy(tc,REASON_EFFECT)>0 then if atk<0 then atk=0 end
Duel.Damage(1-tp,atk,REASON_EFFECT) local val=Duel.Damage(tp,atk,REASON_EFFECT)
Duel.Damage(tp,atk,REASON_EFFECT) if val>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,val,REASON_EFFECT)
end end
end end
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