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