Commit aefaef90 authored by Tachibana's avatar Tachibana

得得得得得

parent 60b6c51d
......@@ -95,10 +95,9 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
Duel.RegisterEffect(e2,tp)
--[[
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
......
......@@ -124,7 +124,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,0,nil)
local g1=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,tama.tamas_sumElements(g),e,tp)
local g1=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,tama.tamas_sumElements(g),e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g1:Select(tp,1,1,nil)
local tc=tg:GetFirst()
......
--Tama & Amarillo
local m=13255411
local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(cm.cost)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e4:SetCondition(cm.damcon)
e4:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e5)
elements={{"tama_elements",{{TAMA_ELEMENT_WIND,1},{TAMA_ELEMENT_ENERGY,1},{TAMA_ELEMENT_LIFE,1}}}}
cm[c]=elements
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=math.floor(Duel.GetLP(tp)/2)
Duel.PayLPCost(tp,ct)
e:SetLabel(ct)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
c:CompleteProcedure()
end
end
function cm.rfilter(c)
return c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER)
end
function cm.rfilter1(c,code)
return code==0 or c:IsCode(code)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
local code=0
local g1=Duel.GetMatchingGroup(cm.rfilter,tp,LOCATION_MZONE,0,e:GetHandler())
local g2=Duel.GetMatchingGroup(cm.rfilter,tp,LOCATION_HAND,0,nil)
local g3=Duel.GetMatchingGroup(cm.rfilter,tp,LOCATION_DECK,0,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 and g1:IsExists(cm.rfilter1,1,nil,code) and ((g2:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(m,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g1:FilterSelect(tp,cm.rfilter1,1,1,nil,code)
Duel.HintSelection(sg1)
sg:Merge(sg1)
end
if g2:GetCount()>0 and g2:IsExists(cm.rfilter1,1,nil,code) and ((sg:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(m,3))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg2=g2:FilterSelect(tp,cm.rfilter1,1,1,nil,code)
Duel.HintSelection(sg2)
sg:Merge(sg2)
end
if g3:GetCount()>0 and g3:IsExists(cm.rfilter1,1,nil,code) and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(m,4))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg3=g2:FilterSelect(tp,cm.rfilter1,1,1,nil,code)
Duel.HintSelection(sg3)
sg:Merge(sg3)
end
local ct=Duel.SendtoGrave(sg,REASON_COST)
local atk=0
local def=0
if ct>0 then
atk=sg:GetFirst():GetTextAttack()
def=sg:GetFirst():GetTextDefense()
end
e:SetLabel(ct,atk,def)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local ct,atk,def=e:GetLabel()
if g:GetCount()==0 then return end
local sc=g:GetFirst()
while sc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(-atk)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(-def)
sc:RegisterEffect(e2)
sc=g:GetNext()
end
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(ct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.damcon(e)
return e:GetHandler():GetBattleTarget()~=nil
end
......@@ -43,7 +43,6 @@ function c33200916.initial_effect(c)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c33200916.reccon)
e4:SetTarget(c33200916.rectg)
e4:SetOperation(c33200916.recop)
c:RegisterEffect(e4)
......@@ -114,9 +113,6 @@ function c33200916.tpop(e,tp,eg,ep,ev,re,r,rp)
end
--e4
function c33200916.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,33200900)>0
end
function c33200916.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,0x132a,1) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x132a)
......
......@@ -22,7 +22,7 @@ function cm.initial_effect(c)
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_UNCOPYABLE)
e6:SetTargetRange(1,1)
e6:SetValue(cm.aclimit)
c:RegisterEffect(e6)
......
......@@ -1252,7 +1252,7 @@ function cm.HTFTDOperation(e,tp,eg,ep,ev,re,r,rp)
end
end
--
function cm.HTFPlacePZone(c,lv,loc,lab,event,code)
function cm.HTFPlacePZone(c,lv,loc,lab,event,code,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(event)
......
......@@ -56,5 +56,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end
......@@ -42,5 +42,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end
......@@ -42,5 +42,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveToField(sg:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end
......@@ -34,5 +34,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end
......@@ -40,5 +40,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoExtraP(sg,tp,REASON_EFFECT)
end
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end
......@@ -35,5 +35,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg)
end
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end
......@@ -33,5 +33,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoExtraP(sg,tp,REASON_EFFECT)
end
end
SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end
......@@ -19,6 +19,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDestructable(e) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_CARD,0,m)
if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 and Duel.IsChainDisablable(ev) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then Duel.NegateEffect(ev) end
SNNM.HTFPlacePZone(e:GetHandler(),2,LOCATION_EXTRA,1,EVENT_PHASE+PHASE_END,m)
SNNM.HTFPlacePZone(e:GetHandler(),2,LOCATION_EXTRA,1,EVENT_PHASE+PHASE_END,m,tp)
end
end
......@@ -19,6 +19,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDestructable(e) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_CARD,0,m)
if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 and Duel.IsChainDisablable(ev) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then Duel.NegateEffect(ev) end
SNNM.HTFPlacePZone(e:GetHandler(),2,LOCATION_EXTRA,1,EVENT_PHASE+PHASE_END,m)
SNNM.HTFPlacePZone(e:GetHandler(),2,LOCATION_EXTRA,1,EVENT_PHASE+PHASE_END,m,tp)
end
end
......@@ -48,5 +48,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg)
end
end
SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end
......@@ -48,5 +48,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoExtraP(pg1,tp,REASON_EFFECT)
end
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end
......@@ -31,5 +31,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end
......@@ -66,7 +66,7 @@ function cm.cbcon(e,tp,eg,ep,ev,re,r,rp)
return r~=REASON_REPLACE and Duel.GetAttackTarget()==e:GetHandler()
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x9533) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x9533) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.cbtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,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