Commit 5de90d61 authored by Nemo Ma's avatar Nemo Ma

fix

parent c24521aa
...@@ -94,7 +94,6 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,7 +94,6 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) local g=Duel.GetFieldGroup(p,LOCATION_HAND,0)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
Duel.ShuffleDeck(p)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(p,g:GetCount(),REASON_EFFECT) Duel.Draw(p,g:GetCount(),REASON_EFFECT)
end end
......
...@@ -75,7 +75,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,1000,REASON_EFFECT) Duel.Recover(tp,1000,REASON_EFFECT)
end end
end end
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_CHAOS)>=2 and Duel.GetFieldGroup(tp,0,LOCATION_DECK)>0 then if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_CHAOS)>=2 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 then
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(m,6)) Duel.Hint(HINT_MESSAGE,0,aux.Stringid(m,6))
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
for i=1,j do for i=1,j do
......
...@@ -3,8 +3,8 @@ local m=13257224 ...@@ -3,8 +3,8 @@ local m=13257224
local cm=_G["c"..m] local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end) xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableCounterPermit(0x354,LOCATION_SZONE) c:EnableCounterPermit(TAMA_COSMIC_BATTLESHIP_COUNTER_CHARGE,LOCATION_SZONE)
c:SetCounterLimit(0x354,8) c:SetCounterLimit(TAMA_COSMIC_BATTLESHIP_COUNTER_CHARGE,8)
c:EnableReviveLimit() c:EnableReviveLimit()
--equip limit --equip limit
local e11=Effect.CreateEffect(c) local e11=Effect.CreateEffect(c)
...@@ -78,13 +78,13 @@ function cm.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,13 +78,13 @@ function cm.acop(e,tp,eg,ep,ev,re,r,rp)
if ct>0 then if ct>0 then
--ct=math.floor(math.sqrt(ct)) --ct=math.floor(math.sqrt(ct))
ct=math.ceil(ct/2) ct=math.ceil(ct/2)
e:GetHandler():AddCounter(COSMIC_BATTLESHIP_CHARGE,ct) e:GetHandler():AddCounter(TAMA_COSMIC_BATTLESHIP_COUNTER_CHARGE,ct)
end end
end end
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,COSMIC_BATTLESHIP_CHARGE,8,REASON_COST) end if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,TAMA_COSMIC_BATTLESHIP_COUNTER_CHARGE,8,REASON_COST) end
e:GetHandler():RemoveCounter(tp,COSMIC_BATTLESHIP_CHARGE,8,REASON_COST) e:GetHandler():RemoveCounter(tp,TAMA_COSMIC_BATTLESHIP_COUNTER_CHARGE,8,REASON_COST)
end end
function cm.codisable(e,tp,eg,ep,ev,re,r,rp) function cm.codisable(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
......
...@@ -78,6 +78,7 @@ function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -78,6 +78,7 @@ function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x351,1) end if chk==0 then return e:GetHandler():IsCanAddCounter(0x351,1) end
end end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp) function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_EXTRA,0,1,1,nil,c) local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_EXTRA,0,1,1,nil,c)
......
...@@ -4,21 +4,25 @@ function c188806.initial_effect(c) ...@@ -4,21 +4,25 @@ function c188806.initial_effect(c)
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.NonTuner(nil),1,1,c188806.syncheck) aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.NonTuner(nil),1,1,c188806.syncheck)
--SpecialSummon --SpecialSummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(188806,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,188806)
e1:SetCondition(c188806.spcon)
e1:SetTarget(c188806.sptg) e1:SetTarget(c188806.sptg)
e1:SetOperation(c188806.spop) e1:SetOperation(c188806.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Negate --Negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(188806,2)) e2:SetDescription(aux.Stringid(188806,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,088806)
e2:SetCondition(c188806.negcon) e2:SetCondition(c188806.negcon)
e2:SetCost(c188806.negcost) e2:SetCost(c188806.negcost)
e2:SetTarget(c188806.negtg) e2:SetTarget(c188806.negtg)
...@@ -29,6 +33,9 @@ function c188806.syncheck(g) ...@@ -29,6 +33,9 @@ function c188806.syncheck(g)
local sg=g:Clone() local sg=g:Clone()
return sg:GetClassCount(Card.GetOriginalAttribute)==sg:GetCount() and sg:GetClassCount(Card.GetOriginalRace)==sg:GetCount() return sg:GetClassCount(Card.GetOriginalAttribute)==sg:GetCount() and sg:GetClassCount(Card.GetOriginalRace)==sg:GetCount()
end end
function c188806.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c188806.spfil(c,e,tp) function c188806.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x3f38) and not c:IsAttribute(ATTRIBUTE_DARK) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x3f38) and not c:IsAttribute(ATTRIBUTE_DARK)
end end
...@@ -42,7 +49,7 @@ function c188806.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +49,7 @@ function c188806.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if g:GetCount()<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
function c188806.ckfil(c) function c188806.ckfil(c)
return c:IsOnField() and c:IsSetCard(0x3f38) return c:IsOnField() and c:IsSetCard(0x3f38)
...@@ -78,6 +85,3 @@ end ...@@ -78,6 +85,3 @@ end
function c188806.negop(e,tp,eg,ep,ev,re,r,rp) function c188806.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
...@@ -3,19 +3,15 @@ function c188808.initial_effect(c) ...@@ -3,19 +3,15 @@ function c188808.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,nil,2,2,c188808.lcheck) aux.AddLinkProcedure(c,nil,2,2,c188808.lcheck)
c:EnableReviveLimit() c:EnableReviveLimit()
--to grave
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE) e1:SetCondition(c188808.regcon)
e1:SetCountLimit(1) e1:SetOperation(c188808.regop)
e1:SetTarget(c188808.tgtg)
e1:SetOperation(c188808.tgop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
...@@ -28,13 +24,33 @@ end ...@@ -28,13 +24,33 @@ end
function c188808.lcheck(g) function c188808.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x3f38) and g:GetClassCount(Card.GetRace)==g:GetCount() return g:IsExists(Card.IsLinkSetCard,1,nil,0x3f38) and g:GetClassCount(Card.GetRace)==g:GetCount()
end end
function c188808.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c188808.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) or (re and re:GetHandler():IsCode(188807))
end
function c188808.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c188808.tgcon)
e1:SetTarget(c188808.tgtg)
e1:SetOperation(c188808.tgop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c188808.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return (c:IsSummonType(SUMMON_TYPE_LINK) or c:IsSummonType(SUMMON_TYPE_SPECIAL+188807)) and re:GetHandler():IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end return not c:IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_ONFIELD) end
function c188808.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end end
function c188808.tgop(e,tp,eg,ep,ev,re,r,rp) function c188808.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()<=0 then return end if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
...@@ -59,5 +75,3 @@ function c188808.spop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,5 +75,3 @@ function c188808.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
...@@ -15,7 +15,7 @@ function cm.initial_effect(c) ...@@ -15,7 +15,7 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetTarget(cm.discon) e1:SetCondition(cm.discon)
e1:SetTarget(cm.distg) e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop) e1:SetOperation(cm.disop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -28,7 +28,7 @@ function cm.initial_effect(c) ...@@ -28,7 +28,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE) e2:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetTarget(cm.pscon) e2:SetCondition(cm.pscon)
e2:SetTarget(cm.pstg) e2:SetTarget(cm.pstg)
e2:SetOperation(cm.psop) e2:SetOperation(cm.psop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -37,7 +37,7 @@ function cm.initial_effect(c) ...@@ -37,7 +37,7 @@ function cm.initial_effect(c)
e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTarget(cm.imcon) e3:SetCondition(cm.imcon)
e3:SetValue(cm.efilter) e3:SetValue(cm.efilter)
c:RegisterEffect(e3) c:RegisterEffect(e3)
......
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