Commit 063f359e authored by wind2009's avatar wind2009

Fix

parent c478abf2
...@@ -52,7 +52,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,7 +52,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.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) then if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
end end
\ No newline at end of file
...@@ -37,7 +37,7 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -37,7 +37,7 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToChain() then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end end
end end
...@@ -51,7 +51,7 @@ end ...@@ -51,7 +51,7 @@ end
function s.negop(e,tp,eg,ep,ev,re,r,rp) function s.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e,false) then if tc:IsFaceup() and tc:IsRelateToChain() and tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -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_DECKDES+CATEGORY_REMOVE+CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_DECKDES+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -13,9 +14,10 @@ function s.initial_effect(c) ...@@ -13,9 +14,10 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.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.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,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,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
...@@ -24,7 +26,7 @@ end ...@@ -24,7 +26,7 @@ end
function s.filter1(c,tp) function s.filter1(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FISH) and return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FISH) and
(c:IsAbleToGrave() and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,c) (c:IsAbleToGrave() and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,c)
or c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.filter3,tp,LOCATION_DECK,0,1,c)) or c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.filter3,tp,LOCATION_DECK,0,1,c))
end end
function s.filter2(c) function s.filter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FISH) and c:IsAbleToGrave() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FISH) and c:IsAbleToGrave()
...@@ -39,11 +41,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -39,11 +41,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.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.IsAbleToRemove,tp,0,LOCATION_HAND,nil,1-tp) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil,1-tp)
if #g>1 and Duel.IsChainDisablable(0) and Duel.SelectYesNo(1-tp,aux.Stringid(id,0)) then if #g>1 and Duel.SelectYesNo(1-tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local tc=g:Select(1-tp,2,2,nil) local tc=g:Select(1-tp,2,2,nil)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
Duel.NegateEffect(0)
return return
end end
local g1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_DECK,0,nil,tp) local g1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_DECK,0,nil,tp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment