Commit ae6f82ec authored by IMJoyJ's avatar IMJoyJ

Revert "add skill 71490127"

This reverts commit f4a50b08.
parent f4a50b08
...@@ -2,7 +2,7 @@ local skillLists={} ...@@ -2,7 +2,7 @@ local skillLists={}
local function addSkill(code, skill) local function addSkill(code, skill)
if not skillLists[code] then if not skillLists[code] then
skillLists[code]={} skillLists[code]={}
end end
table.insert(skillLists[code], skill) table.insert(skillLists[code], skill)
end end
...@@ -10,7 +10,7 @@ end ...@@ -10,7 +10,7 @@ end
local function getAllSkillCodes() local function getAllSkillCodes()
local skillCodes={} local skillCodes={}
for code,_ in pairs(skillLists) do for code,_ in pairs(skillLists) do
table.insert(skillCodes, code) table.insert(skillCodes, code)
end end
return skillCodes return skillCodes
end end
...@@ -18,56 +18,56 @@ end ...@@ -18,56 +18,56 @@ end
local function registerSkillForPlayer(tp, code) local function registerSkillForPlayer(tp, code)
local skills=skillLists[code] local skills=skillLists[code]
for _,skill in ipairs(skills) do for _,skill in ipairs(skills) do
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
skill(e1) skill(e1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
local function wrapDeckSkill(code, effectFactory) local function wrapDeckSkill(code, effectFactory)
addSkill(code, function(e2) addSkill(code, function(e2)
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_DECK) e1:SetRange(LOCATION_DECK)
effectFactory(e1) effectFactory(e1)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetTargetRange(LOCATION_DECK,0) e2:SetTargetRange(LOCATION_DECK,0)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetTarget(function(e,c) e2:SetTarget(function(e,c)
local dg=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_DECK,0) local dg=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_DECK,0)
if #dg==0 then return false end if #dg==0 then return false end
local minc=dg:GetMinGroup(Card.GetSequence):GetFirst() local minc=dg:GetMinGroup(Card.GetSequence):GetFirst()
return c==minc return c==minc
end) end)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
end) end)
end end
local function phaseSkill(code, phase, op, con, both) local function phaseSkill(code, phase, op, con, both)
wrapDeckSkill(code, function(e1) wrapDeckSkill(code, function(e1)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+phase) e1:SetCode(EVENT_PHASE+phase)
e1:SetCountLimit(1,0x7ffffff-code) e1:SetCountLimit(1,0x7ffffff-code)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return (both or Duel.GetTurnPlayer()==tp) and (not con or con(e,tp,eg,ep,ev,re,r,rp)) return (both or Duel.GetTurnPlayer()==tp) and (not con or con(e,tp,eg,ep,ev,re,r,rp))
end) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,code) Duel.Hint(HINT_CARD,0,code)
op(e,tp,eg,ep,ev,re,r,rp) op(e,tp,eg,ep,ev,re,r,rp)
end) end)
end) end)
end end
local function oneTimeSkill(code, op) local function oneTimeSkill(code, op)
addSkill(code, function(e1) addSkill(code, function(e1)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST) e1:SetCode(EVENT_ADJUST)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,code) Duel.Hint(HINT_CARD,0,code)
op(e,tp,eg,ep,ev,re,r,rp) op(e,tp,eg,ep,ev,re,r,rp)
e:Reset() e:Reset()
end) end)
end) end)
end end
...@@ -79,7 +79,6 @@ local function endPhaseSkill(code, op, con, both) ...@@ -79,7 +79,6 @@ local function endPhaseSkill(code, op, con, both)
phaseSkill(code, PHASE_END, op, con, both) phaseSkill(code, PHASE_END, op, con, both)
end end
standbyPhaseSkill(48356796, function(e,tp,eg,ep,ev,re,r,rp) standbyPhaseSkill(48356796, function(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,2,REASON_RULE) Duel.Draw(tp,2,REASON_RULE)
end) end)
...@@ -87,8 +86,8 @@ end) ...@@ -87,8 +86,8 @@ end)
standbyPhaseSkill(2295831, function(e,tp,eg,ep,ev,re,r,rp) standbyPhaseSkill(2295831, function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end, function(e,tp,eg,ep,ev,re,r,rp) end, function(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAbleToHand, tp, LOCATION_DECK, 0, 1, nil) return Duel.IsExistingMatchingCard(Card.IsAbleToHand, tp, LOCATION_DECK, 0, 1, nil)
...@@ -104,24 +103,24 @@ end) ...@@ -104,24 +103,24 @@ end)
for _,event in ipairs({EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS}) do for _,event in ipairs({EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS}) do
wrapDeckSkill(23434538, function(e1) wrapDeckSkill(23434538, function(e1)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(event) e1:SetCode(event)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local count = eg:FilterCount(function(c) local count = eg:FilterCount(function(c)
return c:IsControler(1-tp) and c:IsType(TYPE_MONSTER) return c:IsControler(1-tp) and c:IsType(TYPE_MONSTER)
end, 1, nil) end, 1, nil)
return ep~=tp and count>0 and Duel.GetMZoneCount(tp)>=count return ep~=tp and count>0 and Duel.GetMZoneCount(tp)>=count
end) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,23434538) Duel.Hint(HINT_CARD,0,23434538)
local tg=eg:Filter(function(c) local tg=eg:Filter(function(c)
return c:IsControler(1-tp) and c:IsType(TYPE_MONSTER) return c:IsControler(1-tp) and c:IsType(TYPE_MONSTER)
end, nil) end, nil)
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
local cc=Duel.CreateToken(tp,tc:GetOriginalCode()) local cc=Duel.CreateToken(tp,tc:GetOriginalCode())
Duel.MoveToField(cc,tp,tp,LOCATION_MZONE,tc:GetPosition(),true) Duel.MoveToField(cc,tp,tp,LOCATION_MZONE,tc:GetPosition(),true)
end end
end) end)
end) end)
end end
...@@ -129,16 +128,16 @@ wrapDeckSkill(1372887, function(e1) ...@@ -129,16 +128,16 @@ wrapDeckSkill(1372887, function(e1)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and not re:GetHandler():IsType(TYPE_TOKEN) return ep~=tp and not re:GetHandler():IsType(TYPE_TOKEN)
end) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,1372887) Duel.Hint(HINT_CARD,0,1372887)
local cc=Duel.CreateToken(tp,re:GetHandler():GetOriginalCode()) local cc=Duel.CreateToken(tp,re:GetHandler():GetOriginalCode())
Duel.SendtoHand(cc,nil,REASON_RULE) Duel.SendtoHand(cc,nil,REASON_RULE)
if(cc:IsLocation(LOCATION_HAND)) then if(cc:IsLocation(LOCATION_HAND)) then
Duel.ConfirmCards(1-tp,cc) Duel.ConfirmCards(1-tp,cc)
end end
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end) end)
end) end)
...@@ -163,16 +162,6 @@ end, function(e,tp) ...@@ -163,16 +162,6 @@ end, function(e,tp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
end) end)
phaseSkill(71490127, PHASE_BATTLE_START, function(e,tp,eg,ep,ev,re,r,rp)
local num=#Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_SZONE,0,nil)
for _=1,num do
local tc=Duel.CreateToken(tp,99267150)
Duel.MoveToField(tc,tp,tp,LOCATION_MZONE,POS_FACEDOWN_DEFENSE,true)
end
end, function(e,tp)
return (#Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_SZONE,0,nil))>0
end,true)
addSkill(9952083, function(e1) addSkill(9952083, function(e1)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT) e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
...@@ -190,22 +179,22 @@ addSkill(47529357, function(e1) ...@@ -190,22 +179,22 @@ addSkill(47529357, function(e1)
e1:SetProperty(e1:GetProperty()|EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(e1:GetProperty()|EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_DESTROY_REPLACE) e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(destroyReplaceFilter,1,nil,tp) end if chk==0 then return eg:IsExists(destroyReplaceFilter,1,nil,tp) end
return true return true
end) end)
e1:SetValue(function(e,c) e1:SetValue(function(e,c)
return destroyReplaceFilter(c,e:GetHandlerPlayer()) return destroyReplaceFilter(c,e:GetHandlerPlayer())
end) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,47529357) Duel.Hint(HINT_CARD,0,47529357)
end) end)
end) end)
standbyPhaseSkill(73915051, function(e,tp,eg,ep,ev,re,r,rp) standbyPhaseSkill(73915051, function(e,tp,eg,ep,ev,re,r,rp)
local count=math.min((Duel.GetMZoneCount(tp)),4) local count=math.min((Duel.GetMZoneCount(tp)),4)
for i=1,count do for i=1,count do
local token=Duel.CreateToken(tp,73915051+i) local token=Duel.CreateToken(tp,73915051+i)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end, function(e,tp,eg,ep,ev,re,r,rp) end, function(e,tp,eg,ep,ev,re,r,rp)
...@@ -220,11 +209,11 @@ addSkill(53239672, function(e1) ...@@ -220,11 +209,11 @@ addSkill(53239672, function(e1)
e1:SetProperty(e1:GetProperty()|EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(e1:GetProperty()|EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetValue(function(e) e1:SetValue(function(e)
Duel.Hint(HINT_CARD,0,53239672) Duel.Hint(HINT_CARD,0,53239672)
return 0 return 0
end) end)
e1:SetCondition(function(e) e1:SetCondition(function(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0 return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0
end) end)
end) end)
...@@ -239,26 +228,25 @@ end, true) ...@@ -239,26 +228,25 @@ end, true)
local godCodes={55410871,55410871,55410871,55410871,55410871} local godCodes={55410871,55410871,55410871,55410871,55410871}
oneTimeSkill(21082832, function(e,tp,eg,ep,ev,re,r,rp) oneTimeSkill(21082832, function(e,tp,eg,ep,ev,re,r,rp)
for _,code in ipairs(godCodes) do for _,code in ipairs(godCodes) do
local tc=Duel.CreateToken(tp,code) local tc=Duel.CreateToken(tp,code)
Duel.MoveToField(tc,tp,tp,LOCATION_MZONE,POS_FACEUP_ATTACK,true) Duel.MoveToField(tc,tp,tp,LOCATION_MZONE,POS_FACEUP_ATTACK,true)
--tc:RegisterFlagEffect(37818795,RESET_EVENT+RESETS_STANDARD,0,1,2) --tc:RegisterFlagEffect(37818795,RESET_EVENT+RESETS_STANDARD,0,1,2)
--[[if code==10000010 then --[[if code==10000010 then
for _,ecode in ipairs({EFFECT_UPDATE_ATTACK,EFFECT_UPDATE_DEFENSE}) do for _,ecode in ipairs({EFFECT_UPDATE_ATTACK,EFFECT_UPDATE_DEFENSE}) do
local e1=Effect.CreateEffect(tc) local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(ecode) e1:SetCode(ecode)
e1:SetValue(4000) e1:SetValue(4000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
end end
end]] end]]
end end
end) end)
function c18940556_tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c18940556_tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget() end if chk==0 then return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget() end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD+LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD+LOCATION_HAND,nil)
...@@ -267,7 +255,7 @@ end ...@@ -267,7 +255,7 @@ end
function c18940556_tgop(e,tp,eg,ep,ev,re,r,rp) function c18940556_tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD+LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD+LOCATION_HAND,nil)
if #g>0 then if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
...@@ -306,7 +294,7 @@ wrapDeckSkill(4392470, function(e1) ...@@ -306,7 +294,7 @@ wrapDeckSkill(4392470, function(e1)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST) e1:SetCode(EVENT_ADJUST)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,4392470) return not Duel.IsPlayerAffectedByEffect(tp,4392470)
end) end)
e1:SetOperation(initializeLion) e1:SetOperation(initializeLion)
end) end)
...@@ -343,18 +331,18 @@ local function initialize() ...@@ -343,18 +331,18 @@ local function initialize()
local skillSelections={} local skillSelections={}
local skillCodes=getAllSkillCodes() local skillCodes=getAllSkillCodes()
for tp=0,1 do for tp=0,1 do
local g=Group.CreateGroup() local g=Group.CreateGroup()
for _,code in ipairs(skillCodes) do for _,code in ipairs(skillCodes) do
local c=Duel.CreateToken(tp,code) local c=Duel.CreateToken(tp,code)
Duel.Remove(c,POS_FACEDOWN,REASON_RULE) Duel.Remove(c,POS_FACEDOWN,REASON_RULE)
g:AddCard(c) g:AddCard(c)
end end
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
skillSelections[tp]=tc:GetOriginalCode() skillSelections[tp]=tc:GetOriginalCode()
Duel.Exile(g,REASON_RULE) Duel.Exile(g,REASON_RULE)
end end
for tp=0,1 do for tp=0,1 do
registerSkillForPlayer(tp,skillSelections[tp]) registerSkillForPlayer(tp,skillSelections[tp])
end 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