Commit 77a8092b authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent ee75e408
......@@ -58,15 +58,15 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)
local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.ShuffleExtra(1-tp)
local sg=g:RandomSelect(tp,1)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local sc=og:GetFirst()
Duel.ConfirmCards(1-tp,og)
local sc=sg:GetFirst()
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_CARD,0,sc:GetOriginalCode())
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local tg=Duel.GetMatchingGroup(aux.AND(Card.IsAbleToDeck,Card.IsFaceupEx),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local exg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil)
if sc:IsAttack(35) then
if #tg>0 then
......
......@@ -1178,6 +1178,7 @@ function cm.NanahiraTrap(c,...)
if te:GetCode()==EVENT_FREE_CHAIN then
e1:SetHintTiming(0x1e0)
end
e1:SetCountLimit(1)
e1:SetCost(cm.SelfReleaseCost)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
......
......@@ -68,13 +68,13 @@ function cm.srop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.GetType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER)
return g:GetClassCount(Card.GetRace)==g:GetCount() and g:GetClassCount(Card.GetAttribute)==g:GetCount()
end
function cm.rcheck(c)
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(Card.GetType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER)
local tf=false
if g:GetCount()>=3 then
g:AddCard(c)
......@@ -92,8 +92,8 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local lg=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
Duel.ConfirmCards(1-tp,lg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(Card.GetType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER)
local dg=Duel.GetMatchingGroup(Card.GetType,tp,LOCATION_DECK,0,nil,TYPE_MONSTER)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER)
local dg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_DECK,0,nil,TYPE_MONSTER)
local ac=dg:GetFirst()
local cg=Group.CreateGroup()
for i=1,#dg do
......
......@@ -50,7 +50,8 @@ function cm.retg1(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.retop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if #g~=0 and Duel.IsExistingMatchingCard(cm.ffil,tp,LOCATION_FZONE,0,1,nil) then
Duel.SendtoGrave(g,REASON_EFFECT)
......
......@@ -58,6 +58,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
e6:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e6:SetCountLimit(1)
e6:SetOperation(cm.spop)
e6:SetReset(RESET_PHASE+PHASE_STANDBY,2)
Duel.RegisterEffect(e6,tp)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -65,6 +66,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
e7:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e7:SetCountLimit(1)
e7:SetOperation(cm.spop)
e7:SetReset(RESET_PHASE+PHASE_BATTLE,2)
Duel.RegisterEffect(e7,tp)
c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD,0,0,0,0)
end
......@@ -84,7 +86,7 @@ function cm.spfilter1(c,e,tp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(m+1)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if c:GetFlagEffect(m+1)>0 and Duel.GetTurnCount()-c:GetTurnID()==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(m,3))then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
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