Commit 8a3a5335 authored by nekrozar's avatar nekrozar

fix

parent e341bfb5
...@@ -4,7 +4,6 @@ function c28566710.initial_effect(c) ...@@ -4,7 +4,6 @@ function c28566710.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_STANDBY_PHASE) e1:SetHintTiming(0,TIMING_STANDBY_PHASE)
e1:SetCondition(c28566710.condition) e1:SetCondition(c28566710.condition)
...@@ -15,18 +14,17 @@ end ...@@ -15,18 +14,17 @@ end
function c28566710.condition(e,tp,eg,ep,ev,re,r,rp) function c28566710.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=1000 and Duel.GetTurnPlayer()~=tp return Duel.GetLP(tp)<=1000 and Duel.GetTurnPlayer()~=tp
end end
function c28566710.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c28566710.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_DECK)
end end
function c28566710.spfilter(c,e,tp) function c28566710.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c28566710.operation(e,tp,eg,ep,ev,re,r,rp) function c28566710.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
local tc=tg:GetFirst()
local hg=Duel.GetFieldGroup(tp,0xe,0xe) local hg=Duel.GetFieldGroup(tp,0xe,0xe)
hg:RemoveCard(tc) hg:RemoveCard(tc)
Duel.SendtoGrave(hg,REASON_EFFECT) Duel.SendtoGrave(hg,REASON_EFFECT)
...@@ -34,8 +32,8 @@ function c28566710.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,8 +32,8 @@ function c28566710.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(1-tp,c28566710.spfilter,1-tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(1-tp,c28566710.spfilter,1-tp,LOCATION_DECK,0,1,1,nil,e,tp)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
Duel.BreakEffect()
Duel.SpecialSummon(sc,0,1-tp,1-tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(sc,0,1-tp,1-tp,false,false,POS_FACEUP_ATTACK)
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -45,7 +43,6 @@ function c28566710.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +43,6 @@ function c28566710.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.CalculateDamage(sc,tc) Duel.CalculateDamage(sc,tc)
end end
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+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_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