Commit 3b24ed63 authored by Nemo Ma's avatar Nemo Ma

fix

parent 5de90d61
......@@ -54,14 +54,14 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if sg1:GetCount()>0 then
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WATER)>0 and Duel.IsPlayerCanDiscardDeck(tp,3) then
Duel.BreakEffect()
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(m,1))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,1))
Duel.ShuffleDeck(tp)
Duel.DiscardDeck(tp,3,REASON_EFFECT)
sg2:Merge(Duel.GetOperatedGroup())
end
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WIND)>0 and Duel.IsPlayerCanDraw(tp,2) then
Duel.BreakEffect()
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(m,2))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,2))
Duel.Draw(tp,1,REASON_EFFECT)
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
......@@ -86,7 +86,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,10)) then
local ct=sg3:GetCount()
Duel.BreakEffect()
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(m,3))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,3))
Duel.SendtoDeck(sg3,tp,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
......@@ -95,7 +95,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_MANA)>=3 then
Duel.BreakEffect()
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(m,4))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,4))
--change damage
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -114,7 +114,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY)>=2 and Duel.IsExistingTarget(cm.filter3,tp,LOCATION_MZONE,0,1,nil,eg,ep,ev,re,r,rp) then
Duel.BreakEffect()
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(m,5))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,5))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,eg,ep,ev,re,r,rp):GetFirst()
local tep=tc:GetControler()
......
......@@ -32,18 +32,18 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if sg1:GetCount()<=0 then return end
local j=1
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ORDER)>=2 then
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(m,1))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,1))
j=j+1
end
if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WATER)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WIND))>=2 then
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(m,2))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,2))
for i=1,j do
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_EARTH)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY))>=2 and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) then
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(m,3))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,3))
for i=1,j do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
......@@ -56,7 +56,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end
end
if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_FIRE)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY))>=2 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) then
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(m,4))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,4))
for i=1,j do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
......@@ -69,14 +69,14 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end
end
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_LIFE)>=1 then
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(m,5))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,5))
for i=1,j do
Duel.BreakEffect()
Duel.Recover(tp,1000,REASON_EFFECT)
end
end
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,1,aux.Stringid(m,6))
Duel.ConfirmCards(tp,g)
for i=1,j do
local g=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
......
......@@ -38,7 +38,7 @@ function cm.smtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end
function cm.smop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroupCount(cm.tdfilter,tp,LOCATION_GRAVE,0)
local g=Duel.GetMatchingGroupCount(cm.tdfilter,tp,LOCATION_GRAVE,0,nil)
--[[
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
......
......@@ -2,6 +2,7 @@
function c188807.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(188807,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
......@@ -37,7 +38,7 @@ function c188807.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsLocation(LOCATION_GRAVE) then
op=1
end
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and op==1 then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and op==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......@@ -50,34 +51,32 @@ end
function c188807.lkcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c188807.spfil(c,e,tp)
return c:IsCode(188808) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SPECIAL+188807,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
function c188807.spfil(c,e,tp,rc)
return c:IsCode(188808) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SPECIAL+188807,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,rc,c)>0
end
function c188807.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
local op=0
if Duel.GetFieldGroup(tp,LOCATION_MZONE,0):GetCount()==Duel.GetFieldGroup(tp,LOCATION_MZONE,0):GetClassCount(Card.GetAttribute) and Duel.GetFieldGroup(tp,LOCATION_MZONE,0):GetCount()==Duel.GetFieldGroup(tp,LOCATION_MZONE,0):GetClassCount(Card.GetRace) and e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(c188807.spfil,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(188807,1)) then
op=1
end
e:SetLabel(op)
local mg=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local b=#mg==mg:GetClassCount(Card.GetAttribute) and #mg==mg:GetClassCount(Card.GetRace) and e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(c188807.spfil,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler())
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) or b end
if b then
e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e:SetLabel(1)
else e:SetLabel(0) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c188807.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=e:GetLabel()
if op==0 then
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil)
if g:GetCount()>0 then
local g1=Duel.GetMatchingGroup(c188807.spfil,tp,LOCATION_EXTRA,0,nil,e,tp,c)
local g2=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil)
if e:GetLabel()==1 and c:IsRelateToEffect(e) and c:IsReleasable() and #g1>0 and Duel.SelectYesNo(tp,aux.Stringid(188807,1)) then
if Duel.Release(e:GetHandler(),REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g1:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
elseif #g2>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sg=g2:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
else
local g=Duel.GetMatchingGroup(c188807.spfil,tp,LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,SUMMON_TYPE_SPECIAL+188807,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
end
......@@ -17,11 +17,12 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>=1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,2,nil,e,tp)
return ft>=1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,2,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
......
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