Commit a99719f8 authored by Nemo Ma's avatar Nemo Ma

updating scl modules

parent b5b600e7
No preview for this file type
...@@ -94,7 +94,8 @@ if not RealSclVersion then ...@@ -94,7 +94,8 @@ if not RealSclVersion then
rsef.rsvalinfo={} --value for inside series, inside type etc. rsef.rsvalinfo={} --value for inside series, inside type etc.
rscost.costinfo={} --Cost information rscost.costinfo={} --Cost information
rsef.targetlist={} --target group list rsef.targetlist={} --target group list
rsef.effectinfo={} --Effect information rsef.attachinfo={} --Effect information for attach effect
rsef.effectinfo={} --Effect information
--[[ --[[
c.rssynlv --No level synchro monster's level c.rssynlv --No level synchro monster's level
c.rsnlritlv --No level ritual monster's level c.rsnlritlv --No level ritual monster's level
...@@ -601,7 +602,7 @@ function rsef.FC_AttachEffect(cardtbl,attachtime,desctbl1,ctlimittbl,flag,range, ...@@ -601,7 +602,7 @@ function rsef.FC_AttachEffect(cardtbl,attachtime,desctbl1,ctlimittbl,flag,range,
if flag2&EFFECT_FLAG_NO_TURN_RESET~=0 then if flag2&EFFECT_FLAG_NO_TURN_RESET~=0 then
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
end end
rsef.effectinfo[e1]=e2 rsef.attachinfo[e1]=e2
local reset,resetct=0,0 local reset,resetct=0,0
if resettbl then if resettbl then
reset,resetct=rsef.RegisterReset(nil,resettbl,true) reset,resetct=rsef.RegisterReset(nil,resettbl,true)
...@@ -640,20 +641,20 @@ function rsef.FC_AttachEffect_resetinfo(e,tp,eg,ep,ev,re,r,rp) ...@@ -640,20 +641,20 @@ function rsef.FC_AttachEffect_resetinfo(e,tp,eg,ep,ev,re,r,rp)
return return
end end
end end
rsef.effectinfo[ev]=baseop rsef.attachinfo[ev]=baseop
end end
function rsef.ChangeChainOperation2(chainev,changeop,ischange) function rsef.ChangeChainOperation2(chainev,changeop,ischange)
rsef.ChangeChainOperation(chainev,changeop) rsef.ChangeChainOperation(chainev,changeop)
if not ischange then if not ischange then
rsef.effectinfo[chainev]=changeop rsef.attachinfo[chainev]=changeop
end end
end end
function rsef.GetOperation(e,chainev) function rsef.GetOperation(e,chainev)
return rsef.effectinfo[chainev] return rsef.attachinfo[chainev]
end end
function rsef.FC_AttachEffect_setcon(e) function rsef.FC_AttachEffect_setcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
local te=rsef.effectinfo[e] local te=rsef.attachinfo[e]
te:SetCondition(aux.TRUE) te:SetCondition(aux.TRUE)
local bool=te:IsActivatable(tp) local bool=te:IsActivatable(tp)
te:SetCondition(aux.FALSE) te:SetCondition(aux.FALSE)
...@@ -746,7 +747,7 @@ function rsef.FC_AttachEffect_geteffect(parameterlistcheck,parameterlistsolve,at ...@@ -746,7 +747,7 @@ function rsef.FC_AttachEffect_geteffect(parameterlistcheck,parameterlistsolve,at
rsef.FC_AttachEffect_Operation_Solve(parameterlistsolve,effect,attachlisttotal) rsef.FC_AttachEffect_Operation_Solve(parameterlistsolve,effect,attachlisttotal)
end end
table.insert(attachlist,effect) table.insert(attachlist,effect)
local te=rsef.effectinfo[effect] local te=rsef.attachinfo[effect]
te:UseCountLimit(tp,1) te:UseCountLimit(tp,1)
local g2=rsef.FC_AttachEffect_getgroup(parameterlistcheck,cardlist,attachtime) local g2=rsef.FC_AttachEffect_getgroup(parameterlistcheck,cardlist,attachtime)
until (ct>1 and #g2<=0) or (ct>1 and not Duel.SelectYesNo(tp,aux.Stringid(m,11))) until (ct>1 and #g2<=0) or (ct>1 and not Duel.SelectYesNo(tp,aux.Stringid(m,11)))
...@@ -1949,16 +1950,17 @@ end ...@@ -1949,16 +1950,17 @@ end
--cost: Pay LP --cost: Pay LP
function rscost.lpcost(lp,isdirectly,islabel) function rscost.lpcost(lp,isdirectly,islabel)
return function(e,tp,eg,ep,ev,re,r,rp,chk) return function(e,tp,eg,ep,ev,re,r,rp,chk)
if type(lp)=="boolean" then lp=math.floor(Duel.GetLP(tp)/2) end local clp=lp
if isdirectly then lp=Duel.GetLP(tp)-lp end if type(lp)=="boolean" then clp=math.floor(Duel.GetLP(tp)/2) end
if isdirectly then clp=Duel.GetLP(tp)-clp end
if type(islabel)=="nil" and isdirectly then islabel=true end if type(islabel)=="nil" and isdirectly then islabel=true end
if chk==0 then if chk==0 then
return lp>0 and Duel.CheckLPCost(tp,lp) return clp>0 and Duel.CheckLPCost(tp,clp)
end end
Duel.PayLPCost(tp,lp) Duel.PayLPCost(tp,clp)
rscost.costinfo[e]=lp rscost.costinfo[e]=clp
if islabel then if islabel then
e:SetLabel(lp) e:SetLabel(clp)
end end
end end
end end
...@@ -2371,15 +2373,19 @@ function rsgf.GetSurroundingGroup2(seq,loc,cp,contains) ...@@ -2371,15 +2373,19 @@ function rsgf.GetSurroundingGroup2(seq,loc,cp,contains)
return sg return sg
end end
--Group effect: get adjacent group --Group effect: get adjacent group
function rsgf.GetAdjacentGroup(c) function rsgf.GetAdjacentGroup(c,contains)
return rsgf.GetAdjacentGroup2(c:GetSequence(),c:GetLocation(),c:GetControler(),contains)
end
--Group effect: get adjacent group (use sequence)
function rsgf.GetAdjacentGroup2(seq,loc,tp,contains)
local g=Group.CreateGroup() local g=Group.CreateGroup()
local seq=c:GetSequence()
if seq>0 and seq<5 then if seq>0 and seq<5 then
rsgf.Mix(g,Duel.GetFieldCard(c:GetControler(),c:GetLocation(),seq-1)) rsgf.Mix(g,Duel.GetFieldCard(tp,loc,seq-1))
end end
if seq<4 then if seq<4 then
rsgf.Mix(g,Duel.GetFieldCard(c:GetControler(),c:GetLocation(),seq+1)) rsgf.Mix(g,Duel.GetFieldCard(tp,loc,seq+1))
end end
if contains then rsgf.Mix(g,Duel.GetFieldCard(tp,loc,seq)) end
return g return g
end end
--Group effect: Get Target Group for Operations --Group effect: Get Target Group for Operations
...@@ -2443,8 +2449,7 @@ end ...@@ -2443,8 +2449,7 @@ end
function rscf.SetSpecialSummonProduce(cardtbl,range,con,op,desctbl,ctlimittbl,resettbl) function rscf.SetSpecialSummonProduce(cardtbl,range,con,op,desctbl,ctlimittbl,resettbl)
local tc1,tc2,ignore=rsef.GetRegisterCard(cardtbl) local tc1,tc2,ignore=rsef.GetRegisterCard(cardtbl)
if not desctbl then desctbl=rshint.spproc end if not desctbl then desctbl=rshint.spproc end
local flag="uc" local flag=not tc2:IsSummonableCard() and "uc,cd" or "uc"
if not tc2:IsSummonableCard() then flag="uc,cd" end
local e1=rsef.Register(cardtbl,EFFECT_TYPE_FIELD,EFFECT_SPSUMMON_PROC,desctbl,ctlimittbl,nil,flag,range,con,nil,nil,op,nil,nil,nil,resettbl) local e1=rsef.Register(cardtbl,EFFECT_TYPE_FIELD,EFFECT_SPSUMMON_PROC,desctbl,ctlimittbl,nil,flag,range,con,nil,nil,op,nil,nil,nil,resettbl)
return e1 return e1
end end
...@@ -2454,7 +2459,7 @@ function rscf.SetSummonCondition(cardtbl,isnsable,sumvalue,iseffectspsum,resettb ...@@ -2454,7 +2459,7 @@ function rscf.SetSummonCondition(cardtbl,isnsable,sumvalue,iseffectspsum,resettb
local tc1,tc2,ignore=rsef.GetRegisterCard(cardtbl) local tc1,tc2,ignore=rsef.GetRegisterCard(cardtbl)
if tc2:IsStatus(STATUS_COPYING_EFFECT) then return end if tc2:IsStatus(STATUS_COPYING_EFFECT) then return end
if not isnsable then if not isnsable then
if iseffectspsum then if iseffectspsum or (sumvalue and sumvalue==rsval.spcons) then
tc2:EnableUnsummonable() tc2:EnableUnsummonable()
else else
tc2:EnableReviveLimit() tc2:EnableReviveLimit()
...@@ -3166,13 +3171,17 @@ function cm.initial_effect(c) ...@@ -3166,13 +3171,17 @@ function cm.initial_effect(c)
"rsos" = "OracleSmith" "rsos" = "OracleSmith"
"rssp" = "StellarPearl" "rssp" = "StellarPearl"
--"rsgd" = "GhostdomDragon" --"rsgd" = "GhostdomDragon"
"rsed" = "EpicDragon"
}--]] }--]]
-- "Series Others" -- "Series Others"
--[[rsv.Series2={ --[[rsv.Series2={
"rsve" = "Voison"
"rsneov"= "Neons"
"tfrsv" = "T.Fairies"
"rsss" = "StarSpirit"
"rssg" = "SexGun" "rssg" = "SexGun"
"rslap" = "Lapin" "rslap" = "Lapin"
"rsss" = "StarSpirit"
"rslrd" = "LifeDeathRoundDance" "rslrd" = "LifeDeathRoundDance"
"rsps" = "PseudoSoul" "rsps" = "PseudoSoul"
"rslf" = "LittleFox" "rslf" = "LittleFox"
...@@ -3181,6 +3190,8 @@ function cm.initial_effect(c) ...@@ -3181,6 +3190,8 @@ function cm.initial_effect(c)
"rspq" = "PhantomQuantum" "rspq" = "PhantomQuantum"
"rsphh" = "PhantomThievesOfHearts" "rsphh" = "PhantomThievesOfHearts"
"rssk" = "Shinkansen" "rssk" = "Shinkansen"
"rsan" = "Arknights"
"rsnm" = "Nightmare"
}--]] }--]]
end end
end end
\ No newline at end of file
...@@ -20,4 +20,4 @@ function cm.initial_effect(c) ...@@ -20,4 +20,4 @@ function cm.initial_effect(c)
end end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
rsve.addcounter(tp,5) rsve.addcounter(tp,5)
end end
\ No newline at end of file
...@@ -53,4 +53,4 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,4 +53,4 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
rsve.addcounter(tp,g:GetFirst():GetLevel()*2,nil,e:GetHandler()) rsve.addcounter(tp,g:GetFirst():GetLevel()*2,nil,e:GetHandler())
end end
end end
end end
\ No newline at end of file
...@@ -79,3 +79,4 @@ function cm.damop(sel) ...@@ -79,3 +79,4 @@ function cm.damop(sel)
end end
end end
end end
...@@ -167,7 +167,7 @@ function rsss.ntop(fun) ...@@ -167,7 +167,7 @@ function rsss.ntop(fun)
end end
end end
function rsss.ActFieldFunction(c,code) function rsss.ActFieldFunction(c,code)
local e1=rsef.QO(c,nil,{m,6},{1,code},nil,nil,LOCATION_FZONE,nil,rscost.costself(Card.IsAbleToDeckAsCost,"td"),rsss.actg,rsss.acop) local e1=rsef.QO(c,nil,{m,6},{1,code},nil,nil,LOCATION_FZONE,nil,rscost.cost(Card.IsAbleToDeckAsCost,"td"),rsss.actg,rsss.acop)
e1:SetLabel(code) e1:SetLabel(code)
return e1 return e1
end end
...@@ -240,13 +240,13 @@ function cm.thfilter(c) ...@@ -240,13 +240,13 @@ function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x144d) return c:IsAbleToHand() and c:IsSetCard(0x144d)
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -5,8 +5,7 @@ local cm=_G["c"..m] ...@@ -5,8 +5,7 @@ local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2) aux.AddLinkProcedure(c,nil,2)
local e1=rsef.FV_CANNOT_BE_TARGET(c,"battle",nil,cm.cfilter,{LOCATION_MZONE,LOCATION_MZONE },cm.con) local e1,e3=rsef.FV_CANNOT_BE_TARGET(c,"battle,effect",nil,cm.cfilter,{LOCATION_MZONE,LOCATION_MZONE },cm.con)
local e3=rsef.FV_CANNOT_BE_TARGET(c,"effect",nil,cm.cfilter,{LOCATION_MZONE,LOCATION_MZONE },cm.con)
--effect gain --effect gain
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
...@@ -125,7 +125,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -125,7 +125,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then
c:CompleteProcedure() c:CompleteProcedure()
local lp=rscost[e] local lp=rscost.costinfo[e]
if not lp or lp<1000 or not c:IsType(TYPE_XYZ) then return end if not lp or lp<1000 or not c:IsType(TYPE_XYZ) then return end
local ct=math.floor(lp/1000) local ct=math.floor(lp/1000)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_DECK,0,nil)
......
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