Commit 5827c413 authored by TanakaKotoha's avatar TanakaKotoha

dededededededededededede

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