Commit ba608d6c authored by Nemo Ma's avatar Nemo Ma

Merge branch 'master' of https://github.com/amarillonmc/no81cards

parents d6eb54c1 083ef523
...@@ -56,15 +56,6 @@ function c71401001.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,15 +56,6 @@ function c71401001.op1(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetTargetRange(0xff,0xfe)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c71401001.rmtg)
Duel.RegisterEffect(e1,tp)
end end
function c71401001.rmtg(e,c) function c71401001.rmtg(e,c)
return c:GetOwner()==e:GetHandlerPlayer() return c:GetOwner()==e:GetHandlerPlayer()
...@@ -97,6 +88,15 @@ function c71401001.op2(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,6 +88,15 @@ function c71401001.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetTargetRange(0xff,0xfe)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c71401001.rmtg)
Duel.RegisterEffect(e1,tp)
end end
end end
function yume.ButterflyCounter() function yume.ButterflyCounter()
...@@ -118,6 +118,14 @@ end ...@@ -118,6 +118,14 @@ end
function yume.ButterflyAcLimit(e,re,tp) function yume.ButterflyAcLimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function yume.AddThisCardBanishedAlreadyCheck(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_REMOVE)
e1:SetCondition(aux.ThisCardInGraveAlreadyCheckReg)
c:RegisterEffect(e1)
return e1
end
function yume.AddButterflySpell(c,id) function yume.AddButterflySpell(c,id)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401001,2)) e1:SetDescription(aux.Stringid(71401001,2))
......
...@@ -39,7 +39,7 @@ function c71401002.op2(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c71401002.op2(e,tp,eg,ep,ev,re,r,rp)
if tc then if tc then
local b1=tc:IsAbleToHand() local b1=tc:IsAbleToHand()
local b2=not tc:IsForbidden() and tc:CheckUniqueOnField(tp) local b2=not tc:IsForbidden() and tc:CheckUniqueOnField(tp)
if b1 and (not b2 or Duel.SelectOption(tp,1150,aux.Stringid(71401002,1))==0) then if b1 and (not b2 or Duel.SelectOption(tp,1190,aux.Stringid(71401002,1))==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
......
...@@ -49,7 +49,7 @@ function c71401003.op2(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c71401003.op2(e,tp,eg,ep,ev,re,r,rp)
local b1=tc:IsAbleToHand() local b1=tc:IsAbleToHand()
local b2=not tc:IsForbidden() and tc:CheckUniqueOnField(tp) local b2=not tc:IsForbidden() and tc:CheckUniqueOnField(tp)
local flag=0 local flag=0
if b1 and (not b2 or Duel.SelectOption(tp,1152,aux.Stringid(71401003,1))==0) then if b1 and (not b2 or Duel.SelectOption(tp,1190,aux.Stringid(71401003,1))==0) then
flag=Duel.SendtoHand(tc,nil,REASON_EFFECT) flag=Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
......
--蝶现-「像」 --蝶现-「像」
xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end) xpcall(function() require("expansions/script/c71401001") end,function() require("script/c71401001") end)
function c71401004.initial_effect(c) function c71401004.initial_effect(c)
--same effect send this card to grave and spsummon another card check --same effect sends this card to grave or banishes it, and spsummon another card check
local e0=aux.AddThisCardInGraveAlreadyCheck(c) local e0=aux.AddThisCardInGraveAlreadyCheck(c)
local e0a=yume.AddThisCardBanishedAlreadyCheck(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401004,0)) e1:SetDescription(aux.Stringid(71401004,0))
...@@ -12,15 +13,21 @@ function c71401004.initial_effect(c) ...@@ -12,15 +13,21 @@ function c71401004.initial_effect(c)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetCountLimit(1,71401004) e1:SetCountLimit(1,71401004)
e1:SetLabelObject(e0)
e1:SetCost(c71401004.cost1) e1:SetCost(c71401004.cost1)
e1:SetCondition(c71401004.con1)
e1:SetTarget(c71401004.tg1) e1:SetTarget(c71401004.tg1)
e1:SetOperation(c71401004.op1) e1:SetOperation(c71401004.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e1a=e1:Clone() local e1a=e1:Clone()
e1a:SetCode(EVENT_SPSUMMON_SUCCESS) e1a:SetCode(EVENT_SPSUMMON_SUCCESS)
e1a:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1a:SetCondition(c71401004.con1)
e1a:SetLabelObject(e0)
c:RegisterEffect(e1a) c:RegisterEffect(e1a)
local e1b=e1a:Clone()
e1b:SetCode(EVENT_SPSUMMON_SUCCESS)
e1b:SetRange(LOCATION_REMOVED)
e1b:SetLabelObject(e0a)
c:RegisterEffect(e1b)
--banish --banish
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401004,1)) e2:SetDescription(aux.Stringid(71401004,1))
...@@ -44,13 +51,13 @@ function c71401004.con1(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,13 +51,13 @@ function c71401004.con1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c71401004.filtercon1,1,nil,tp,se) return eg:IsExists(c71401004.filtercon1,1,nil,tp,se)
end end
function c71401004.filterc1(c,tp) function c71401004.filterc1(c,tp)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToRemoveAsCost()
and Duel.GetMZoneCount(tp,c)>0 and Duel.GetMZoneCount(tp,c)>0
end end
function c71401004.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c71401004.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401004.filterc1,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return Duel.IsExistingMatchingCard(c71401004.filterc1,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71401004.filterc1,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c71401004.filterc1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
yume.RegButterflyCostLimit(e,tp) yume.RegButterflyCostLimit(e,tp)
end end
......
...@@ -21,7 +21,7 @@ function c71401006.con2(e,tp,eg,ep,ev,re,r,rp) ...@@ -21,7 +21,7 @@ function c71401006.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetType()==TYPE_TRAP+TYPE_CONTINUOUS return e:GetHandler():GetType()==TYPE_TRAP+TYPE_CONTINUOUS
end end
function c71401006.filterc2(c) function c71401006.filterc2(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToDeckOrExtraAsCost() return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToDeckAsCost()
end end
function c71401006.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c71401006.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401006.filterc2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,nil) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return Duel.IsExistingMatchingCard(c71401006.filterc2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,nil) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
......
...@@ -33,7 +33,7 @@ function c71401007.con1(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +33,7 @@ function c71401007.con1(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end end
function c71401007.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c71401007.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 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,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
...@@ -70,11 +70,13 @@ function c71401007.op2(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,11 +70,13 @@ function c71401007.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
Duel.BreakEffect() Duel.BreakEffect()
if Duel.Draw(tp,g:GetCount(),REASON_EFFECT)>0 then
local sg=Duel.GetMatchingGroup(c71401007.filter2,tp,LOCATION_HAND,0,nil,e,tp) local sg=Duel.GetMatchingGroup(c71401007.filter2,tp,LOCATION_HAND,0,nil,e,tp)
if Duel.Draw(tp,g:GetCount(),REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401007,2)) then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401007,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end end
end
end end
\ No newline at end of file
...@@ -50,7 +50,7 @@ end ...@@ -50,7 +50,7 @@ end
function c71401008.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c71401008.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401008.filterc2,tp,LOCATION_ONFIELD,0,1,nil,tp) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return Duel.IsExistingMatchingCard(c71401008.filterc2,tp,LOCATION_ONFIELD,0,1,nil,tp) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71401008.filterc2,tp,LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c71401008.filterc2,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
yume.RegButterflyCostLimit(e,tp) yume.RegButterflyCostLimit(e,tp)
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