Commit d7eaa45c authored by POLYMER's avatar POLYMER

fix

parent 4c037958
...@@ -23,6 +23,7 @@ function cm.initial_effect(c) ...@@ -23,6 +23,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetValue(11451480)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCondition(cm.con) e2:SetCondition(cm.con)
e2:SetTarget(cm.tg) e2:SetTarget(cm.tg)
...@@ -49,7 +50,7 @@ function cm.check(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +50,7 @@ function cm.check(e,tp,eg,ep,ev,re,r,rp)
local g2=Group.CreateGroup() local g2=Group.CreateGroup()
for tc in aux.Next(eg) do for tc in aux.Next(eg) do
local te=tc:GetReasonEffect() local te=tc:GetReasonEffect()
if te and (te:GetOwner():IsOriginalSetCard(0x97f) or te:GetValue()==11451480) and tc:IsReason(REASON_EFFECT) then return end if te and te:GetValue()==11451480 and tc:IsReason(REASON_EFFECT) then return end
if tc:GetReasonPlayer()==0 and tc:GetOwner()==0 then if tc:GetReasonPlayer()==0 and tc:GetOwner()==0 then
g1:AddCard(tc) g1:AddCard(tc)
elseif tc:GetReasonPlayer()==1 and tc:GetOwner()==1 then elseif tc:GetReasonPlayer()==1 and tc:GetOwner()==1 then
......
...@@ -23,6 +23,7 @@ function cm.initial_effect(c) ...@@ -23,6 +23,7 @@ function cm.initial_effect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetValue(11451480)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCondition(cm.con) e2:SetCondition(cm.con)
...@@ -51,7 +52,7 @@ function cm.check(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +52,7 @@ function cm.check(e,tp,eg,ep,ev,re,r,rp)
local g2=Group.CreateGroup() local g2=Group.CreateGroup()
for tc in aux.Next(eg) do for tc in aux.Next(eg) do
local te=tc:GetReasonEffect() local te=tc:GetReasonEffect()
if te and (te:GetOwner():IsOriginalSetCard(0x97f) or te:GetValue()==11451480) and tc:IsReason(REASON_EFFECT) then return end if te and te:GetValue()==11451480 and tc:IsReason(REASON_EFFECT) then return end
if tc:GetReasonPlayer()==0 and tc:GetControler()==0 then if tc:GetReasonPlayer()==0 and tc:GetControler()==0 then
g1:AddCard(tc) g1:AddCard(tc)
elseif tc:GetReasonPlayer()==1 and tc:GetControler()==1 then elseif tc:GetReasonPlayer()==1 and tc:GetControler()==1 then
......
...@@ -24,6 +24,7 @@ function cm.initial_effect(c) ...@@ -24,6 +24,7 @@ function cm.initial_effect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetValue(11451480)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCondition(cm.con) e2:SetCondition(cm.con)
...@@ -39,7 +40,7 @@ function cm.xyzcheck(g) ...@@ -39,7 +40,7 @@ function cm.xyzcheck(g)
return g:GetFirst():GetAttribute()&g:GetNext():GetAttribute()>0 return g:GetFirst():GetAttribute()&g:GetNext():GetAttribute()>0
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not re:GetOwner():IsOriginalSetCard(0x97f) and re:GetValue()~=11451480 return re:GetValue()~=11451480
end end
function cm.filter(c,re) function cm.filter(c,re)
return c:IsCanOverlay() and c:IsRelateToEffect(re) return c:IsCanOverlay() and c:IsRelateToEffect(re)
......
...@@ -12,6 +12,7 @@ function cm.initial_effect(c) ...@@ -12,6 +12,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
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:SetValue(11451480)
e1:SetTarget(cm.thtg) e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop) e1:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -21,6 +22,7 @@ function cm.initial_effect(c) ...@@ -21,6 +22,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetValue(11451480)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetTarget(cm.tg) e2:SetTarget(cm.tg)
......
...@@ -25,6 +25,7 @@ function cm.initial_effect(c) ...@@ -25,6 +25,7 @@ function cm.initial_effect(c)
e3:SetDescription(aux.Stringid(m,3)) e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetValue(11451910)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_HAND+LOCATION_MZONE) e3:SetRange(LOCATION_HAND+LOCATION_MZONE)
e3:SetCondition(cm.spcon) e3:SetCondition(cm.spcon)
......
...@@ -18,6 +18,7 @@ function cm.initial_effect(c) ...@@ -18,6 +18,7 @@ function cm.initial_effect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetValue(11451910)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetTarget(cm.thtg) e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop) e3:SetOperation(cm.thop)
......
...@@ -14,6 +14,7 @@ function cm.initial_effect(c) ...@@ -14,6 +14,7 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_ACTIVATE_COST) e2:SetCode(EFFECT_ACTIVATE_COST)
e2:SetValue(11451910)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
......
...@@ -407,6 +407,7 @@ function cm.operation4(e,tp,eg,ep,ev,re,r,rp) ...@@ -407,6 +407,7 @@ function cm.operation4(e,tp,eg,ep,ev,re,r,rp)
e6:SetCode(EVENT_CHAIN_SOLVED) e6:SetCode(EVENT_CHAIN_SOLVED)
e6:SetLabel(e:GetLabel()) e6:SetLabel(e:GetLabel())
e6:SetCondition(function() return Duel.GetCurrentChain()==1 end) e6:SetCondition(function() return Duel.GetCurrentChain()==1 end)
e6:SetValue(11451910)
e6:SetOperation(cm.operation5) e6:SetOperation(cm.operation5)
Duel.RegisterEffect(e6,tp) Duel.RegisterEffect(e6,tp)
local e7=e6:Clone() local e7=e6:Clone()
......
...@@ -7,6 +7,7 @@ function cm.initial_effect(c) ...@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION) e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetValue(11451910)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -35,7 +35,7 @@ function cm.filter(c) ...@@ -35,7 +35,7 @@ function cm.filter(c)
local re=c:GetReasonEffect() local re=c:GetReasonEffect()
if not re then return false end if not re then return false end
local rc=re:GetOwner() local rc=re:GetOwner()
if not (c:IsType(TYPE_MONSTER) and rc:IsOriginalSetCard(0xc976) and c:IsPreviousLocation(LOCATION_DECK)) then return false end if not (c:IsType(TYPE_MONSTER) and re:GetValue()==11451910 and c:IsPreviousLocation(LOCATION_DECK)) then return false end
local b1=not c:IsLocation(LOCATION_HAND+LOCATION_REMOVED) local b1=not c:IsLocation(LOCATION_HAND+LOCATION_REMOVED)
local b2=c:IsLocation(LOCATION_HAND) and (c:IsPublic() or not c:IsStatus(STATUS_TO_HAND_WITHOUT_CONFIRM)) local b2=c:IsLocation(LOCATION_HAND) and (c:IsPublic() or not c:IsStatus(STATUS_TO_HAND_WITHOUT_CONFIRM))
local b3=c:IsLocation(LOCATION_REMOVED) and c:IsFaceup() local b3=c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()
......
...@@ -56,13 +56,33 @@ function cm.pspcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,13 +56,33 @@ function cm.pspcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function cm.dfilter(c,lv) function cm.dfilter(c,lv)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()<lv return c:GetOriginalType()&TYPE_PENDULUM>0 and c:GetLeftScale()<lv
end end
function cm.hfilter(c,lv) function cm.hfilter(c,lv)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>lv return c:GetOriginalType()&TYPE_PENDULUM>0 and c:GetLeftScale()>lv
end end
function cm.fselect(g,lv) function cm.lhfilter(c,pc)
return g:IsExists(cm.dfilter,1,nil,lv) and g:IsExists(cm.hfilter,1,nil,lv) and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)<=1 local tp=pc:GetControler()
return Duel.GetMZoneCount(tp,c)>0
end
function cm.lefilter(c,pc)
local tp=pc:GetControler()
return Duel.GetLocationCountFromEx(tp,tp,c,TYPE_PENDULUM)>0
end
function cm.fselect(g,lv,lock1,lock2,c)
--if lock2 and not g:IsContains(lock2) then return false end
if lock1 and c:IsLocation(LOCATION_HAND) and not g:IsExists(cm.lhfilter,1,nil,c) then return false end
if lock1 and c:IsLocation(LOCATION_EXTRA) and not g:IsExists(cm.lefilter,1,nil,c) then return false end
return g:IsExists(cm.dfilter,1,nil,lv) and g:IsExists(cm.hfilter,1,nil,lv) and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 and g:FilterCount(Card.IsLocation,nil,LOCATION_ONFIELD)<=1
end
function cm.ffilter(c,lv,lock1,lock2,fil,pc)
if lock1 and c:IsLocation(LOCATION_HAND) and not cm.lhfilter(c,pc) then return false end
if lock1 and c:IsLocation(LOCATION_EXTRA) and not cm.lefilter(c,pc) then return false end
--if lock2 and not c==lock2 then return false end
return fil(c,lv)
end
function cm.IsOriginalType(c,typ)
return c:GetOriginalType()&typ>0
end end
function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -74,33 +74,13 @@ function cm.pspcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -74,33 +74,13 @@ function cm.pspcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function cm.dfilter(c,lv) function cm.dfilter(c,lv)
return c:GetOriginalType()&TYPE_PENDULUM>0 and c:GetLeftScale()<lv return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()<lv
end end
function cm.hfilter(c,lv) function cm.hfilter(c,lv)
return c:GetOriginalType()&TYPE_PENDULUM>0 and c:GetLeftScale()>lv return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>lv
end end
function cm.lhfilter(c,pc) function cm.fselect(g,lv)
local tp=pc:GetControler() return g:IsExists(cm.dfilter,1,nil,lv) and g:IsExists(cm.hfilter,1,nil,lv) and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)<=1
return Duel.GetMZoneCount(tp,c)>0
end
function cm.lefilter(c,pc)
local tp=pc:GetControler()
return Duel.GetLocationCountFromEx(tp,tp,c,TYPE_PENDULUM)>0
end
function cm.fselect(g,lv,lock1,lock2,c)
--if lock2 and not g:IsContains(lock2) then return false end
if lock1 and c:IsLocation(LOCATION_HAND) and not g:IsExists(cm.lhfilter,1,nil,c) then return false end
if lock1 and c:IsLocation(LOCATION_EXTRA) and not g:IsExists(cm.lefilter,1,nil,c) then return false end
return g:IsExists(cm.dfilter,1,nil,lv) and g:IsExists(cm.hfilter,1,nil,lv) and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 and g:FilterCount(Card.IsLocation,nil,LOCATION_ONFIELD)<=1
end
function cm.ffilter(c,lv,lock1,lock2,fil,pc)
if lock1 and c:IsLocation(LOCATION_HAND) and not cm.lhfilter(c,pc) then return false end
if lock1 and c:IsLocation(LOCATION_EXTRA) and not cm.lefilter(c,pc) then return false end
--if lock2 and not c==lock2 then return false end
return fil(c,lv)
end
function cm.IsOriginalType(c,typ)
return c:GetOriginalType()&typ>0
end end
function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -4,7 +4,7 @@ function c19209556.initial_effect(c) ...@@ -4,7 +4,7 @@ function c19209556.initial_effect(c)
--act in set turn --act in set turn
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e0:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--Activate --Activate
......
...@@ -48,6 +48,43 @@ function cm.initial_effect(c) ...@@ -48,6 +48,43 @@ function cm.initial_effect(c)
e4:SetCondition(cm.con4) e4:SetCondition(cm.con4)
e4:SetOperation(cm.op4) e4:SetOperation(cm.op4)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not Strong_Boxer_random_seed then
local result=0
local g=Duel.GetDecktopGroup(0,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
local g=Duel.GetDecktopGroup(1,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
g:DeleteGroup()
Strong_Boxer_random_seed=result
function Strong_Boxer_roll(min,max)
if min==max then return min end
min=tonumber(min)
max=tonumber(max)
Strong_Boxer_random_seed=(Strong_Boxer_random_seed*16807)%2147484647
if min~=nil then
if max==nil then
local random_number=Strong_Boxer_random_seed/2147484647
return math.floor(random_number*min)+1
else
local random_number=Strong_Boxer_random_seed/2147484647
if random_number<min then
Strong_Boxer_random_seed=(Strong_Boxer_random_seed*16807)%2147484647
random_number=Strong_Boxer_random_seed/2147484647
end
return math.floor((max-min)*random_number)+1+min
end
end
return Strong_Boxer_random_seed
end
end
if not cm._ then if not cm._ then
cm._ = true cm._ = true
cm.A = {0,0} cm.A = {0,0}
...@@ -118,7 +155,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -118,7 +155,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
cm.A_status[tp+1] = false cm.A_status[tp+1] = false
local x local x
while true do while true do
x = math.random(1,5) x = Strong_Boxer_roll(1,5)
if cm[tostring(x)](c) then break end if cm[tostring(x)](c) then break end
end end
cm._return(c,x) cm._return(c,x)
...@@ -154,10 +191,10 @@ function cm.spcon(e,c) ...@@ -154,10 +191,10 @@ function cm.spcon(e,c)
return cm.A[c:GetOwner()+1]&c:GetLocation()>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) return cm.A[c:GetOwner()+1]&c:GetLocation()>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function cm.sptg(e,c) function cm.sptg(e,c)
return c:IsSetCard(0x3919) and not c:IsCode(m) return c:IsSetCard(0x3909) and not c:IsCode(m)
end end
function cm.q(c,e,tp) function cm.q(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() and c:IsSetCard(0x3919) and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0) and not c:IsCode(m) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() and c:IsSetCard(0x3909) and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0) and not c:IsCode(m)
end end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -48,6 +48,43 @@ function cm.initial_effect(c) ...@@ -48,6 +48,43 @@ function cm.initial_effect(c)
e4:SetCondition(cm.con4) e4:SetCondition(cm.con4)
e4:SetOperation(cm.op4) e4:SetOperation(cm.op4)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not Strong_Boxer_random_seed then
local result=0
local g=Duel.GetDecktopGroup(0,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
local g=Duel.GetDecktopGroup(1,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
g:DeleteGroup()
Strong_Boxer_random_seed=result
function Strong_Boxer_roll(min,max)
if min==max then return min end
min=tonumber(min)
max=tonumber(max)
Strong_Boxer_random_seed=(Strong_Boxer_random_seed*16807)%2147484647
if min~=nil then
if max==nil then
local random_number=Strong_Boxer_random_seed/2147484647
return math.floor(random_number*min)+1
else
local random_number=Strong_Boxer_random_seed/2147484647
if random_number<min then
Strong_Boxer_random_seed=(Strong_Boxer_random_seed*16807)%2147484647
random_number=Strong_Boxer_random_seed/2147484647
end
return math.floor((max-min)*random_number)+1+min
end
end
return Strong_Boxer_random_seed
end
end
if not cm._ then if not cm._ then
cm._ = true cm._ = true
cm.A = {0,0} cm.A = {0,0}
...@@ -118,7 +155,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -118,7 +155,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
cm.A_status[tp+1] = false cm.A_status[tp+1] = false
local x local x
while true do while true do
x = math.random(1,5) x = Strong_Boxer_roll(1,5)
if cm[tostring(x)](c) then break end if cm[tostring(x)](c) then break end
end end
cm._return(c,x) cm._return(c,x)
...@@ -154,10 +191,10 @@ function cm.spcon(e,c) ...@@ -154,10 +191,10 @@ function cm.spcon(e,c)
return cm.A[c:GetOwner()+1]&c:GetLocation()>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) return cm.A[c:GetOwner()+1]&c:GetLocation()>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function cm.sptg(e,c) function cm.sptg(e,c)
return c:IsSetCard(0x3919) and not c:IsCode(m) return c:IsSetCard(0x3909) and not c:IsCode(m)
end end
function cm.q(c,e,tp) function cm.q(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() and c:IsSetCard(0x3919) and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0) and not c:IsCode(m) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() and c:IsSetCard(0x3909) and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0) and not c:IsCode(m)
end end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -48,6 +48,43 @@ function cm.initial_effect(c) ...@@ -48,6 +48,43 @@ function cm.initial_effect(c)
e4:SetCondition(cm.con4) e4:SetCondition(cm.con4)
e4:SetOperation(cm.op4) e4:SetOperation(cm.op4)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not Strong_Boxer_random_seed then
local result=0
local g=Duel.GetDecktopGroup(0,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
local g=Duel.GetDecktopGroup(1,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
g:DeleteGroup()
Strong_Boxer_random_seed=result
function Strong_Boxer_roll(min,max)
if min==max then return min end
min=tonumber(min)
max=tonumber(max)
Strong_Boxer_random_seed=(Strong_Boxer_random_seed*16807)%2147484647
if min~=nil then
if max==nil then
local random_number=Strong_Boxer_random_seed/2147484647
return math.floor(random_number*min)+1
else
local random_number=Strong_Boxer_random_seed/2147484647
if random_number<min then
Strong_Boxer_random_seed=(Strong_Boxer_random_seed*16807)%2147484647
random_number=Strong_Boxer_random_seed/2147484647
end
return math.floor((max-min)*random_number)+1+min
end
end
return Strong_Boxer_random_seed
end
end
if not cm._ then if not cm._ then
cm._ = true cm._ = true
cm.A = {0,0} cm.A = {0,0}
...@@ -118,7 +155,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -118,7 +155,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
cm.A_status[tp+1] = false cm.A_status[tp+1] = false
local x local x
while true do while true do
x = math.random(1,5) x = Strong_Boxer_roll(1,5)
if cm[tostring(x)](c) then break end if cm[tostring(x)](c) then break end
end end
cm._return(c,x) cm._return(c,x)
...@@ -154,10 +191,10 @@ function cm.spcon(e,c) ...@@ -154,10 +191,10 @@ function cm.spcon(e,c)
return cm.A[c:GetOwner()+1]&c:GetLocation()>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) return cm.A[c:GetOwner()+1]&c:GetLocation()>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function cm.sptg(e,c) function cm.sptg(e,c)
return c:IsSetCard(0x3919) and not c:IsCode(m) return c:IsSetCard(0x3909) and not c:IsCode(m)
end end
function cm.q(c,e,tp) function cm.q(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() and c:IsSetCard(0x3919) and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0) and not c:IsCode(m) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() and c:IsSetCard(0x3909) and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0) and not c:IsCode(m)
end end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -48,6 +48,43 @@ function cm.initial_effect(c) ...@@ -48,6 +48,43 @@ function cm.initial_effect(c)
e4:SetCondition(cm.con4) e4:SetCondition(cm.con4)
e4:SetOperation(cm.op4) e4:SetOperation(cm.op4)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not Strong_Boxer_random_seed then
local result=0
local g=Duel.GetDecktopGroup(0,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
local g=Duel.GetDecktopGroup(1,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
g:DeleteGroup()
Strong_Boxer_random_seed=result
function Strong_Boxer_roll(min,max)
if min==max then return min end
min=tonumber(min)
max=tonumber(max)
Strong_Boxer_random_seed=(Strong_Boxer_random_seed*16807)%2147484647
if min~=nil then
if max==nil then
local random_number=Strong_Boxer_random_seed/2147484647
return math.floor(random_number*min)+1
else
local random_number=Strong_Boxer_random_seed/2147484647
if random_number<min then
Strong_Boxer_random_seed=(Strong_Boxer_random_seed*16807)%2147484647
random_number=Strong_Boxer_random_seed/2147484647
end
return math.floor((max-min)*random_number)+1+min
end
end
return Strong_Boxer_random_seed
end
end
if not cm._ then if not cm._ then
cm._ = true cm._ = true
cm.A = {0,0} cm.A = {0,0}
...@@ -118,7 +155,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -118,7 +155,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
cm.A_status[tp+1] = false cm.A_status[tp+1] = false
local x local x
while true do while true do
x = math.random(1,5) x = Strong_Boxer_roll(1,5)
if cm[tostring(x)](c) then break end if cm[tostring(x)](c) then break end
end end
cm._return(c,x) cm._return(c,x)
...@@ -154,10 +191,10 @@ function cm.spcon(e,c) ...@@ -154,10 +191,10 @@ function cm.spcon(e,c)
return cm.A[c:GetOwner()+1]&c:GetLocation()>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) return cm.A[c:GetOwner()+1]&c:GetLocation()>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function cm.sptg(e,c) function cm.sptg(e,c)
return c:IsSetCard(0x3919) and not c:IsCode(m) return c:IsSetCard(0x3909) and not c:IsCode(m)
end end
function cm.q(c,e,tp) function cm.q(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() and c:IsSetCard(0x3919) and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0) and not c:IsCode(m) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() and c:IsSetCard(0x3909) and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0) and not c:IsCode(m)
end end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -48,6 +48,43 @@ function cm.initial_effect(c) ...@@ -48,6 +48,43 @@ function cm.initial_effect(c)
e4:SetCondition(cm.con4) e4:SetCondition(cm.con4)
e4:SetOperation(cm.op4) e4:SetOperation(cm.op4)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not Strong_Boxer_random_seed then
local result=0
local g=Duel.GetDecktopGroup(0,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
local g=Duel.GetDecktopGroup(1,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
g:DeleteGroup()
Strong_Boxer_random_seed=result
function Strong_Boxer_roll(min,max)
if min==max then return min end
min=tonumber(min)
max=tonumber(max)
Strong_Boxer_random_seed=(Strong_Boxer_random_seed*16807)%2147484647
if min~=nil then
if max==nil then
local random_number=Strong_Boxer_random_seed/2147484647
return math.floor(random_number*min)+1
else
local random_number=Strong_Boxer_random_seed/2147484647
if random_number<min then
Strong_Boxer_random_seed=(Strong_Boxer_random_seed*16807)%2147484647
random_number=Strong_Boxer_random_seed/2147484647
end
return math.floor((max-min)*random_number)+1+min
end
end
return Strong_Boxer_random_seed
end
end
if not cm._ then if not cm._ then
cm._ = true cm._ = true
cm.A = {0,0} cm.A = {0,0}
...@@ -118,7 +155,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -118,7 +155,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
cm.A_status[tp+1] = false cm.A_status[tp+1] = false
local x local x
while true do while true do
x = math.random(1,5) x = Strong_Boxer_roll(1,5)
if cm[tostring(x)](c) then break end if cm[tostring(x)](c) then break end
end end
cm._return(c,x) cm._return(c,x)
...@@ -154,10 +191,10 @@ function cm.spcon(e,c) ...@@ -154,10 +191,10 @@ function cm.spcon(e,c)
return cm.A[c:GetOwner()+1]&c:GetLocation()>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) return cm.A[c:GetOwner()+1]&c:GetLocation()>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function cm.sptg(e,c) function cm.sptg(e,c)
return c:IsSetCard(0x3919) and not c:IsCode(m) return c:IsSetCard(0x3909) and not c:IsCode(m)
end end
function cm.q(c,e,tp) function cm.q(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() and c:IsSetCard(0x3919) and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0) and not c:IsCode(m) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() and c:IsSetCard(0x3909) and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0) and not c:IsCode(m)
end end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -48,6 +48,43 @@ function cm.initial_effect(c) ...@@ -48,6 +48,43 @@ function cm.initial_effect(c)
e4:SetCondition(cm.con4) e4:SetCondition(cm.con4)
e4:SetOperation(cm.op4) e4:SetOperation(cm.op4)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not Strong_Boxer_random_seed then
local result=0
local g=Duel.GetDecktopGroup(0,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
local g=Duel.GetDecktopGroup(1,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
g:DeleteGroup()
Strong_Boxer_random_seed=result
function Strong_Boxer_roll(min,max)
if min==max then return min end
min=tonumber(min)
max=tonumber(max)
Strong_Boxer_random_seed=(Strong_Boxer_random_seed*16807)%2147484647
if min~=nil then
if max==nil then
local random_number=Strong_Boxer_random_seed/2147484647
return math.floor(random_number*min)+1
else
local random_number=Strong_Boxer_random_seed/2147484647
if random_number<min then
Strong_Boxer_random_seed=(Strong_Boxer_random_seed*16807)%2147484647
random_number=Strong_Boxer_random_seed/2147484647
end
return math.floor((max-min)*random_number)+1+min
end
end
return Strong_Boxer_random_seed
end
end
if not cm._ then if not cm._ then
cm._ = true cm._ = true
cm.A = {0,0} cm.A = {0,0}
...@@ -118,7 +155,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -118,7 +155,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
cm.A_status[tp+1] = false cm.A_status[tp+1] = false
local x local x
while true do while true do
x = math.random(1,5) x = Strong_Boxer_roll(1,5)
if cm[tostring(x)](c) then break end if cm[tostring(x)](c) then break end
end end
cm._return(c,x) cm._return(c,x)
...@@ -154,10 +191,10 @@ function cm.spcon(e,c) ...@@ -154,10 +191,10 @@ function cm.spcon(e,c)
return cm.A[c:GetOwner()+1]&c:GetLocation()>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) return cm.A[c:GetOwner()+1]&c:GetLocation()>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function cm.sptg(e,c) function cm.sptg(e,c)
return c:IsSetCard(0x3919) and not c:IsCode(m) return c:IsSetCard(0x3909) and not c:IsCode(m)
end end
function cm.q(c,e,tp) function cm.q(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() and c:IsSetCard(0x3919) and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0) and not c:IsCode(m) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() and c:IsSetCard(0x3909) and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,4)>0) and not c:IsCode(m)
end end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -58,7 +58,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local sg=g:RandomSelect(tp,ct) local sg=g:RandomSelect(tp,ct)
Duel.ConfirmCards(tp,sg) Duel.ConfirmCards(tp,sg)
local tc=sg:GetFirst() local tc=sg:GetFirst()
for tc in aux.Next(g) do for tc in aux.Next(sg) do
-- if VHisc_HDST.nck(tc) then Duel.Destroy(tc,REASON_EFFECT) end -- if VHisc_HDST.nck(tc) then Duel.Destroy(tc,REASON_EFFECT) end
if not VHisc_HDST.codeck(VHisc_STCN,tc) then if not VHisc_HDST.codeck(VHisc_STCN,tc) then
local code=tc:GetOriginalCode() local code=tc:GetOriginalCode()
......
...@@ -68,9 +68,9 @@ function c75075603.filter2(c) ...@@ -68,9 +68,9 @@ function c75075603.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end end
function c75075603.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c75075603.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75075603.filter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c75075603.filter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c75075603.filter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c75075603.filter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c75075603.filter22(c,tp) function c75075603.filter22(c,tp)
......
...@@ -131,7 +131,7 @@ function c75075610.cost7(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -131,7 +131,7 @@ function c75075610.cost7(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c75075610.filter7(c,tp) function c75075610.filter7(c,tp)
return c:IsSetCard(0x5754) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true) return c:IsSetCard(0x5754) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true) and c:IsType(TYPE_FIELD)
end end
function c75075610.tg7(e,tp,eg,ep,ev,re,r,rp,chk) function c75075610.tg7(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75075610.filter7,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c75075610.filter7,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,tp) end
......
This diff is collapsed.
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