Commit d4903aa6 authored by POLYMER's avatar POLYMER

fix

parent 8cabca5f
......@@ -54,13 +54,13 @@ function c60000011.spfilter(c,e,tp)
end
function c60000011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c60000011.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
and Duel.IsExistingMatchingCard(c60000011.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60000011.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60000011.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c60000011.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -70,33 +70,33 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.tgsfilter(c,e,tp)
function cm.tgsfilter1(c,e,tp)
return c:IsLevel(1) and c:IsSetCard(0x115) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tgtfilter(c)
function cm.tgtfilter2(c)
return c:IsLevel(1) and c:IsSetCard(0x115) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.IsExistingMatchingCard(cm.tgsfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or Duel.IsExistingMatchingCard(cm.tgtfilter,tp,LOCATION_DECK,0,1,nil) end
if Duel.IsExistingMatchingCard(cm.tgsfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
if chk==0 then return (Duel.IsExistingMatchingCard(cm.tgsfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or Duel.IsExistingMatchingCard(cm.tgtfilter2,tp,LOCATION_DECK,0,1,nil) end
if Duel.IsExistingMatchingCard(cm.tgsfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if (Duel.IsExistingMatchingCard(cm.tgsfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) and (not Duel.IsExistingMatchingCard(cm.tgtfilter,tp,LOCATION_DECK,0,1,nil)
if (Duel.IsExistingMatchingCard(cm.tgsfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) and (not Duel.IsExistingMatchingCard(cm.tgtfilter2,tp,LOCATION_DECK,0,1,nil)
or Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))==1) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,tgsfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,tgsfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,tgtfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,tgtfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -61,7 +61,7 @@ function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.rmfilter,c:GetControler(),LOCATION_REMOVED,0,nil)*200
end
function cm.cfilter(c)
return c:IsFacedown() or not c:IsSetCard(0x876)
return c:IsFaceup() and not c:IsSetCard(0x876)
end
function cm.cpcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
......
......@@ -6,7 +6,6 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
......
......@@ -66,7 +66,7 @@ function c98921041.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
if not (tc:IsLocation(LOCATION_HAND+LOCATION_DECK) or tc:IsLocation(LOCATION_REMOVED) and tc:IsFacedown()) and Duel.IsPlayerCanSpecialSummonMonster(tp,98921041,0,TYPES_NORMAL_TRAP_MONSTER,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) and Duel.SelectYesNo(tp,aux.Stringid(98921041,1)) then
if not (tc:IsLocation(LOCATION_HAND+LOCATION_DECK) or tc:IsLocation(LOCATION_REMOVED) and tc:IsFacedown()) and Duel.IsPlayerCanSpecialSummonMonster(tp,tc:GetCode(),0,TYPES_NORMAL_TRAP_MONSTER,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) and Duel.SelectYesNo(tp,aux.Stringid(98921041,1)) then
tc:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(tc)
......
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