Commit 488d3e8f authored by Nemo Ma's avatar Nemo Ma

fix and...

parent 932274bd

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -2,6 +2,7 @@
local m=11451415
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,22702055)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......
......@@ -2,6 +2,7 @@
local m=11451422
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,22702055)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......
......@@ -49,7 +49,7 @@ function cm.efilter(e,re)
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_ORDER,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_GRAVE,0,e:GetHandler()),el)
local sg=Group.CreateGroup()
if chk==0 then
return mg:GetCount()>0 and mg:IsExists(tama.tamas_selectElementsForAbove,1,nil,mg,sg,el) and e:GetHandler():IsAbleToRemoveAsCost()
......
......@@ -45,7 +45,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_CHAOS,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_GRAVE,0,e:GetHandler())),el)
local sg=Group.CreateGroup()
if chk==0 then
return mg:GetCount()>0 and mg:IsExists(tama.tamas_selectElementsForAbove,1,nil,mg,sg,el) and e:GetHandler():IsAbleToRemoveAsCost()
......
......@@ -31,10 +31,10 @@ function cm.Foreigner(c)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) and cm.Foreigner(tc) then
if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) and cm.Foreigner(tc) then
e:SetLabel(1)
end
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.spfilter(c,e,tp)
return cm.Foreigner(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -52,13 +52,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetLabel()==1 and (Duel.GetFlagEffect(tp,m)==0 or Duel.GetFlagEffect(tp,m+1)==0 or Duel.GetFlagEffect(tp,m+2)==0 or Duel.GetFlagEffect(tp,m+3)==0) then
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetLabel()==1 and Duel.GetFlagEffect(tp,m)==0 then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
end
end
......
......@@ -33,10 +33,10 @@ function cm.Foreigner(c)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) and cm.Foreigner(tc) then
if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) and cm.Foreigner(tc) then
e:SetLabel(1)
end
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.spfilter(c,e,tp)
return cm.Foreigner(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -54,13 +54,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetLabel()==1 and (Duel.GetFlagEffect(tp,m)==0 or Duel.GetFlagEffect(tp,m+1)==0 or Duel.GetFlagEffect(tp,m+2)==0 or Duel.GetFlagEffect(tp,m-1)==0) then
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetLabel()==1 and Duel.GetFlagEffect(tp,m-1)==0 then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,m-1,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
end
end
......
......@@ -33,10 +33,10 @@ function cm.Foreigner(c)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) and cm.Foreigner(tc) then
if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) and cm.Foreigner(tc) then
e:SetLabel(1)
end
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.spfilter(c,e,tp)
return cm.Foreigner(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -54,13 +54,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetLabel()==1 and (Duel.GetFlagEffect(tp,m)==0 or Duel.GetFlagEffect(tp,m+1)==0 or Duel.GetFlagEffect(tp,m-2)==0 or Duel.GetFlagEffect(tp,m-1)==0) then
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetLabel()==1 and Duel.GetFlagEffect(tp,m-2)==0 then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,m-2,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
end
end
......
......@@ -33,10 +33,10 @@ function cm.Foreigner(c)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) and cm.Foreigner(tc) then
if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) and cm.Foreigner(tc) then
e:SetLabel(1)
end
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.spfilter(c,e,tp)
return cm.Foreigner(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -54,13 +54,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetLabel()==1 and (Duel.GetFlagEffect(tp,m)==0 or Duel.GetFlagEffect(tp,m-1)==0 or Duel.GetFlagEffect(tp,m-2)==0 or Duel.GetFlagEffect(tp,m-3)==0) then
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetLabel()==1 and Duel.GetFlagEffect(tp,m-3)==0 then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,m-3,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
end
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