Commit b0f9af50 authored by Nemo Ma's avatar Nemo Ma

fix

parent 5e0222c6
......@@ -2,6 +2,7 @@
local m=11451484
local cm=_G["c"..m]
function cm.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SPSUMMON_COUNT)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -37,14 +38,14 @@ function cm.filter2(c,e,tp,att)
return c:IsSetCard(0x151) and c:IsType(TYPE_MONSTER) and not c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,1-tp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)<2 end
local sp=Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)
if chk==0 then return sp<2 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetCode(EFFECT_SPSUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetLabel(tp)
e1:SetCondition(function(e,tp) return Duel.GetActivityCount(e:GetLabel(),ACTIVITY_SPSUMMON)>=2 end)
e1:SetTargetRange(1,0)
e1:SetValue(2-sp)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
......
......@@ -51,9 +51,9 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
local c=e:GetHandler()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL or c:IsStatus(STATUS_BATTLE_DESTROYED) then return end
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>3 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_DECK,nil)>0 then
Duel.Hint(HINT_CARD,0,m)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
local tc=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_DECK,nil):GetMaxGroup(Card.GetSequence):GetFirst()
Duel.DisableShuffleCheck()
if cm.equipfd(c,tp,tc) then Duel.Readjust() end
end
......
......@@ -50,9 +50,9 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
local c=e:GetHandler()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL or c:IsStatus(STATUS_BATTLE_DESTROYED) then return end
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>3 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_DECK,nil)>0 then
Duel.Hint(HINT_CARD,0,m)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
local tc=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_DECK,nil):GetMaxGroup(Card.GetSequence):GetFirst()
Duel.DisableShuffleCheck()
if cm.equipfd(c,tp,tc) then Duel.Readjust() end
end
......
......@@ -51,9 +51,9 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
local c=e:GetHandler()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL or c:IsStatus(STATUS_BATTLE_DESTROYED) then return end
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>3 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_DECK,nil)>0 then
Duel.Hint(HINT_CARD,0,m)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
local tc=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_DECK,nil):GetMaxGroup(Card.GetSequence):GetFirst()
Duel.DisableShuffleCheck()
if cm.equipfd(c,tp,tc) then Duel.Readjust() end
end
......
......@@ -48,9 +48,9 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
local c=e:GetHandler()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL or c:IsStatus(STATUS_BATTLE_DESTROYED) then return end
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>3 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_DECK,nil)>0 then
Duel.Hint(HINT_CARD,0,m)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
local tc=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_DECK,nil):GetMaxGroup(Card.GetSequence):GetFirst()
Duel.DisableShuffleCheck()
if cm.equipfd(c,tp,tc) then Duel.Readjust() end
end
......
......@@ -51,9 +51,9 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
local c=e:GetHandler()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL or c:IsStatus(STATUS_BATTLE_DESTROYED) then return end
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>3 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_DECK,nil)>0 then
Duel.Hint(HINT_CARD,0,m)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
local tc=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_DECK,nil):GetMaxGroup(Card.GetSequence):GetFirst()
Duel.DisableShuffleCheck()
if cm.equipfd(c,tp,tc) then Duel.Readjust() end
end
......
......@@ -152,9 +152,9 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
local c=e:GetHandler()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL or c:IsStatus(STATUS_BATTLE_DESTROYED) then return end
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>3 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_DECK,nil)>0 then
Duel.Hint(HINT_CARD,0,m)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
local tc=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_DECK,nil):GetMaxGroup(Card.GetSequence):GetFirst()
Duel.DisableShuffleCheck()
if cm.equipfd(c,tp,tc) then Duel.Readjust() end
end
......
......@@ -153,9 +153,9 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
local c=e:GetHandler()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL or c:IsStatus(STATUS_BATTLE_DESTROYED) then return end
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>3 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_DECK,nil)>0 then
Duel.Hint(HINT_CARD,0,m)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
local tc=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_DECK,nil):GetMaxGroup(Card.GetSequence):GetFirst()
Duel.DisableShuffleCheck()
if cm.equipfd(c,tp,tc) then Duel.Readjust() end
end
......
......@@ -152,9 +152,9 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
local c=e:GetHandler()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL or c:IsStatus(STATUS_BATTLE_DESTROYED) then return end
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then
if not c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>3 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_DECK,nil)>0 then
Duel.Hint(HINT_CARD,0,m)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
local tc=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_DECK,nil):GetMaxGroup(Card.GetSequence):GetFirst()
Duel.DisableShuffleCheck()
if cm.equipfd(c,tp,tc) then Duel.Readjust() 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