Commit 5827c413 authored by TanakaKotoha's avatar TanakaKotoha

dededededededededededede

parent 56d37b31
Pipeline #1946 passed with stages
in 47 minutes and 21 seconds
......@@ -29,8 +29,9 @@ function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
local b1=c:IsSummonable(true,nil)
local b2=c:IsMSetable(true,nil)
local tc=g:GetFirst()
local b1=tc:IsSummonable(true,nil)
local b2=tc:IsMSetable(true,nil)
local op=2
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,3),aux.Stringid(m,4))
......@@ -39,11 +40,11 @@ function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
else
op=Duel.SelectOption(tp,aux.Stringid(m,4))+1
end
if op==0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
if op==0 and tc:IsSummonable(true,nil) then
Duel.Summon(tp,tc,true,nil)
end
if op==1 then
Duel.MSet(tp,g:GetFirst(),true,nil)
if op==1 and tc:IsSummonable(true,nil) then
Duel.MSet(tp,tc,true,nil)
end
end
end
......
......@@ -99,10 +99,11 @@ end
function cm.econ(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==e:GetHandler():GetControler() and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.thhfilter(c,mc)
return c:IsRace(mc:GetRace())
end
function cm.thfilter(c,g)
local sg=g
sg:AddCard(c)
return sg:GetClassCount(Card.GetRace)>=g:GetClassCount(Card.GetRace) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xcca)
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xcca) and not g:IsExists(cm.thhfilter,1,nil,c)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
......
......@@ -45,13 +45,16 @@ function c81011109.thop(e,tp,eg,ep,ev,re,r,rp)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c81011109.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c81011109.splimit(e,c)
return not ((c:IsAttack(1550) and c:IsDefense(1050)) or (c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM)))
end
function c81011109.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
......
......@@ -36,11 +36,11 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.costfilter(c,tp)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_RITUAL) and c:IsAbleToRemoveAsCost()
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(cm.srfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function cm.srfilter(c,code)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_RITUAL) and not c:IsCode(code) and c:IsAbleToHand()
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and not c:IsCode(code) and c:IsAbleToHand()
end
function cm.srcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,1,nil,tp) 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