Merge branch 'china/dev' into 0功能/TailsMainSoul
# Conflicts: # Assets/ManagedResources/~Lua/Common/GlobalDefine.luadev_chengFeng
commit
d69b3c8ca5
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
|
@ -0,0 +1,110 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 90db94f778b84d04cb061a87f8ce8001
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 2
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 65
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 56
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 2516a8a5ede0e474a9aaa0c48bdad1a3
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag: FloatingViewAtlas
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -30,7 +30,8 @@ SDKSubMitType = {
|
|||
TYPE_EXIT_GAME = 5,
|
||||
TYPE_ENTER_COPY = 6,
|
||||
TYPE_EXIT_COPY = 7,
|
||||
TYPE_VIP_LEVELUP = 8
|
||||
TYPE_VIP_LEVELUP = 8,
|
||||
TYPE_CHANGE_NAME = 9
|
||||
}
|
||||
|
||||
SDK_RESULT = {
|
||||
|
@ -300,36 +301,26 @@ HeroProType = {
|
|||
PhysicalDefence = 3, --护甲
|
||||
MagicDefence = 4, --魔抗
|
||||
Speed = 5, --速度
|
||||
InitRage = 7, -- 初始怒气值
|
||||
DamageBocusFactor = 51, --伤害加成百分比
|
||||
DamageReduceFactor = 52, --伤害减免百分比
|
||||
Hit = 53, --效果命中率
|
||||
Dodge = 54, --效果抵抗率
|
||||
CritFactor = 55, --暴击率
|
||||
CritDamageFactor = 56, --暴伤
|
||||
AntiCritFactor = 60, --抗暴率
|
||||
AntiCritDamageFactor = 113, --暴击伤害减免
|
||||
CureFacter = 57, --受到治疗系数
|
||||
TreatFacter = 58, --治疗系数
|
||||
DifferDemonsReduceFactor = 59, --异妖减伤率
|
||||
AntiCritDamageFactor = 60, --抗暴率
|
||||
MaxHpPercentage = 61, --生命值百分比
|
||||
AttackPercentage = 62, --攻击力百分比
|
||||
MaxHpPercentage = 63, --生命值百分比
|
||||
PhysicalDefencePercentage = 64, --护甲百分比
|
||||
SpeedPercentage = 65, --速度百分比
|
||||
DifferDemonsBocusFactor = 66, --异妖伤害加成系数
|
||||
FireDamageBonusFactor = 101, --火攻(%)
|
||||
WindDamageBonusFactor = 102, --风攻(%)
|
||||
WaterDamageBonusFactor = 103, --水攻(%)
|
||||
LandDamageBonusFactor = 104, --地攻(%)
|
||||
LightDamageBonusFactor = 105, --光攻(%)
|
||||
DarkDamageBonusFactor = 106, --暗攻(%)
|
||||
FireDamageReduceFactor = 107, --火抗(%)
|
||||
WindDamageReduceFactor = 108, --风抗(%)
|
||||
WaterDamageReduceFactor = 109, --水抗(%)
|
||||
LandDamageReduceFactor = 110, --地抗(%)
|
||||
LightDamageReduceFactor = 111, --光抗(%)
|
||||
DarkDamageReduceFactor = 112, --暗抗(%)
|
||||
RenBonus = 101, --对人杰阵营神将造成伤害时获得的伤害加成
|
||||
FoBonus = 102, --对佛禅阵营神将造成伤害时获得的伤害加成
|
||||
YaoBonus = 103, --对妖灵阵营神将造成伤害时获得的伤害加成
|
||||
DaoBonus = 104, --对道玄阵营神将造成伤害时获得的伤害加成
|
||||
RenReduce = 107, --受到人杰阵营神将造成的直接伤害时获得的伤害减免
|
||||
FoReduce = 108, --受到佛禅阵营神将造成的直接伤害时获得的伤害减免
|
||||
YaoReduce = 109, --受到妖灵阵营神将造成的直接伤害时获得的伤害减免
|
||||
DaoReduce = 110, --受到道玄阵营神将造成的直接伤害时获得的伤害减免
|
||||
WarPower = 1000, --英雄战斗力(获取英雄属性时会用到)
|
||||
InitRage = 200, -- 初始怒气值
|
||||
}
|
||||
|
||||
--异妖图片资源
|
||||
|
@ -1046,7 +1037,8 @@ ItemType = {
|
|||
heroDogFood =25,--英雄狗粮
|
||||
linglongbaojingkaimen = 26,
|
||||
likeabilityItem = 27,
|
||||
Incarnation = 28,
|
||||
Incarnation = 29,
|
||||
ZuoQiChip = 28, -- 坐骑碎片
|
||||
}
|
||||
JumpType = {
|
||||
Lottery = 1, --招募
|
||||
|
|
|
@ -133,7 +133,8 @@ function BagResolveAnCompoundPanel:BindEvent()
|
|||
end
|
||||
end)
|
||||
Util.AddClick(this.btnCompound, function()
|
||||
if itemData.itemConfig.ItemType==ItemType.HeroDebris then--碎片
|
||||
if itemData.itemConfig.ItemType==ItemType.HeroDebris
|
||||
or itemData.itemConfig.ItemType==ItemType.ZuoQiChip then--碎片
|
||||
if compoundNum>0 then
|
||||
local item={}
|
||||
item.itemId=itemData.id
|
||||
|
@ -292,7 +293,8 @@ function this.OnShowLayout3Data()
|
|||
this.chipFrame:SetActive(false)
|
||||
this.propertyIma:SetActive(false)
|
||||
local gameSetting = ConfigManager.GetConfigData(ConfigName.GameSetting, 1)
|
||||
if itemData.itemConfig.ItemType==ItemType.HeroDebris then--碎片
|
||||
if itemData.itemConfig.ItemType==ItemType.HeroDebris
|
||||
or itemData.itemConfig.ItemType==ItemType.ZuoQiChip then--碎片
|
||||
this.chipFrame:SetActive(true)
|
||||
this.chipFrame:GetComponent("Image").sprite = this.spLoader:LoadSprite(GetHeroChipQuantityImageByquality(itemData.itemConfig.Quantity))
|
||||
if itemData.itemConfig.PropertyName and itemData.itemConfig.PropertyName > 0 then
|
||||
|
@ -305,12 +307,13 @@ function this.OnShowLayout3Data()
|
|||
this.nameText.text=Language[10192]
|
||||
this.btnCompoundText.text=Language[10193]
|
||||
local maxCompoundValue = math.floor(itemData.num/itemData.itemConfig.UsePerCount)
|
||||
compoundMaxNum=maxCompoundValue > gameSetting.HeroCompoundLimit and gameSetting.HeroCompoundLimit or maxCompoundValue
|
||||
endHeroNum=gameSetting.HeroNumlimit-LengthOfTable(HeroManager.GetAllHeroDatas())
|
||||
compoundMaxNum=compoundMaxNum >endHeroNum and endHeroNum or compoundMaxNum
|
||||
if compoundMaxNum > compoundMaxNum then
|
||||
compoundMaxNum = compoundMaxNum
|
||||
--
|
||||
if itemData.itemConfig.ItemType==ItemType.HeroDebris then -- 神将碎片
|
||||
compoundMaxNum = math.min(maxCompoundValue, gameSetting.HeroCompoundLimit, gameSetting.HeroNumlimit-LengthOfTable(HeroManager.GetAllHeroDatas()))
|
||||
elseif itemData.itemConfig.ItemType==ItemType.ZuoQiChip then -- 坐骑碎片
|
||||
compoundMaxNum = math.min(maxCompoundValue, gameSetting.HeroCompoundLimit)
|
||||
end
|
||||
|
||||
elseif itemData.itemConfig.ItemType==ItemType.Box then--宝箱
|
||||
this.nameText.text=Language[10194]
|
||||
this.btnCompoundText.text=Language[10195]
|
||||
|
@ -448,7 +451,8 @@ function this.ShowCompoundNumData(value)
|
|||
compoundNum=value
|
||||
this.Slider:GetComponent("Slider").value=value
|
||||
this.numText1.text = value
|
||||
if itemData.itemConfig.ItemType==ItemType.HeroDebris then--碎片
|
||||
if itemData.itemConfig.ItemType==ItemType.HeroDebris
|
||||
or itemData.itemConfig.ItemType==ItemType.ZuoQiChip then--碎片
|
||||
this.numText.text= Language[10198]..value*itemData.itemConfig.UsePerCount..Language[10199]..value..Language[10200].. string.gsub(GetLanguageStrById(itemData.itemConfig.Name),Language[10201],"")
|
||||
elseif itemData.itemConfig.ItemType==ItemType.Box then--宝箱
|
||||
this.numText.text= Language[10202]..value..Language[10200]..GetLanguageStrById(itemData.itemConfig.Name).."。"
|
||||
|
|
|
@ -633,18 +633,19 @@ function this.GetMonsterPros(id, lv, star)
|
|||
table.insert(allProVal, 11, proList[HeroProType.Dodge] or 0) --闪避率(%)
|
||||
table.insert(allProVal, 12, proList[HeroProType.CritFactor] or 0) --暴击率(%)
|
||||
table.insert(allProVal, 13, proList[HeroProType.CritDamageFactor] or 0) --暴击伤害系数(%)
|
||||
table.insert(allProVal, 14, proList[HeroProType.AntiCritDamageFactor] or 0) --抗暴率(%)
|
||||
table.insert(allProVal, 14, proList[HeroProType.AntiCritFactor] or 0) --抗暴率(%)
|
||||
table.insert(allProVal, 15, proList[HeroProType.TreatFacter] or 1) --治疗加成系数(%) 默认为1
|
||||
table.insert(allProVal, 16, proList[HeroProType.CureFacter] or 1) --受到治疗系数(%)默认为1
|
||||
table.insert(allProVal, 17, 0) --异妖伤害加成系数(%)
|
||||
table.insert(allProVal, 18, 0) --异妖减伤率(%)
|
||||
table.insert(allProVal, 19, 0) --火系伤害减免系数(%)
|
||||
table.insert(allProVal, 20, 0) --风系伤害减免系数(%)
|
||||
table.insert(allProVal, 21, 0) --冰系伤害减免系数(%)
|
||||
table.insert(allProVal, 22, 0) --地系伤害减免系数(%)
|
||||
table.insert(allProVal, 23, 0) --光系伤害减免系数(%)
|
||||
table.insert(allProVal, 24, 0) --暗系伤害减免系数(%)
|
||||
table.insert(allProVal, 25, 0)
|
||||
table.insert(allProVal, 17, proList[HeroProType.RenBonus] or 0) -- 灭人
|
||||
table.insert(allProVal, 18, proList[HeroProType.FoBonus] or 0) -- 灭佛
|
||||
table.insert(allProVal, 19, proList[HeroProType.YaoBonus] or 0) -- 灭妖
|
||||
table.insert(allProVal, 20, proList[HeroProType.DaoBonus] or 0) -- 灭道
|
||||
table.insert(allProVal, 21, proList[HeroProType.RenReduce] or 0) -- 抗人
|
||||
table.insert(allProVal, 22, proList[HeroProType.FoReduce] or 0) -- 抗佛
|
||||
table.insert(allProVal, 23, proList[HeroProType.YaoReduce] or 0) -- 抗妖
|
||||
table.insert(allProVal, 24, proList[HeroProType.DaoReduce] or 0) -- 抗道
|
||||
table.insert(allProVal, 25, proList[HeroProType.AntiCritDamageFactor] or 0) -- 爆伤减免
|
||||
table.insert(allProVal, 26, proList[HeroProType.InitRage] or 0) -- 初始怒气
|
||||
local pros = table.concat(allProVal, "#")
|
||||
return pros
|
||||
end
|
||||
|
@ -1069,6 +1070,8 @@ function this.GetArtFontConfig(_ArtFontType)
|
|||
return "z_zhandou_podun_zh"
|
||||
elseif _ArtFontType == BattleArtFontType.clear then
|
||||
return "z_zhandou_qingchu_zh"
|
||||
elseif _ArtFontType == BattleArtFontType.Blood then
|
||||
return "z_zhandou_jinjia_zh"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ local BuffRegister = {
|
|||
[BuffName.Aura] = "Aura",
|
||||
[BuffName.Brand] = "Brand",
|
||||
[BuffName.Blood] = "Blood",
|
||||
[BuffName.BanBlood] = "BanBlood",
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,26 +5,6 @@ local max = math.max
|
|||
--local BattleLogic = BattleLogic
|
||||
--local BattleUtil = BattleUtil
|
||||
|
||||
--属性编号
|
||||
-- local BattlePropList = {
|
||||
-- RoleDataName.Attack,
|
||||
-- RoleDataName.PhysicalDefence,
|
||||
-- RoleDataName.MagicDefence,
|
||||
-- RoleDataName.Speed,
|
||||
-- RoleDataName.DamageBocusFactor,
|
||||
-- RoleDataName.DamageReduceFactor,
|
||||
-- RoleDataName.Hit,
|
||||
-- RoleDataName.Dodge,
|
||||
-- RoleDataName.Crit,
|
||||
-- RoleDataName.CritDamageFactor,
|
||||
-- RoleDataName.TreatFacter,
|
||||
-- RoleDataName.MaxHp,
|
||||
-- RoleDataName.Hp,
|
||||
-- RoleDataName.CureFacter,
|
||||
-- RoleDataName.Tenacity,
|
||||
-- RoleDataName.InitRage,
|
||||
-- }
|
||||
|
||||
local function buffRandomAction(random, target, buff)
|
||||
|
||||
-- 检测被动技能对技能的加成
|
||||
|
@ -101,7 +81,7 @@ local effectList = {
|
|||
local cb1 = args[2]
|
||||
local f2 = args[3]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
BattleUtil.RandomControl(f1, cb1, caster, target, f2)
|
||||
BattleUtil.RandomControl(f1, cb1, caster, target, f2,skill)
|
||||
end)
|
||||
end,
|
||||
--[d]改变[a]属性[b]%,持续[c]秒
|
||||
|
@ -394,7 +374,7 @@ local effectList = {
|
|||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
BattleUtil.CalDamage(skill, caster, target, dt, f1)
|
||||
if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end,caster,dot) then
|
||||
BattleUtil.RandomControl(f1, ct, caster, target, f3)
|
||||
BattleUtil.RandomControl(f1, ct, caster, target, f3,skill)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
|
@ -958,7 +938,7 @@ local effectList = {
|
|||
local f3 = args[4]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
if BattleUtil.GetHPPencent(target) < f1 then
|
||||
BattleUtil.RandomControl(f2, ct, caster, target, f3)
|
||||
BattleUtil.RandomControl(f2, ct, caster, target, f3,skill)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
|
@ -1169,7 +1149,7 @@ local effectList = {
|
|||
-- 伤害
|
||||
BattleUtil.CalDamage(skill, caster, target, dt, f1)
|
||||
-- 控制未命中则施加增伤印记
|
||||
if not BattleUtil.RandomControl(f2, 1, caster, target, f3) then
|
||||
if not BattleUtil.RandomControl(f2, 1, caster, target, f3,skill) then
|
||||
local brand = Buff.Create(caster, BuffName.Brand, 0, "zengshang")
|
||||
brand.maxLayer = i1
|
||||
brand.clear = false
|
||||
|
@ -1314,7 +1294,7 @@ local effectList = {
|
|||
else
|
||||
BattleUtil.CalDamage(skill, caster, target, dt, f1)
|
||||
end
|
||||
BattleUtil.RandomControl(f2, c1, caster, target, f4)
|
||||
BattleUtil.RandomControl(f2, c1, caster, target, f4,skill)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
@ -1416,9 +1396,9 @@ local effectList = {
|
|||
local arr = BattleUtil.ChooseTarget(caster, 20000)
|
||||
for i=1, #arr do
|
||||
if arr[i] == target then
|
||||
BattleUtil.RandomControl(f1+f3, cb1, caster, arr[i], f2)
|
||||
BattleUtil.RandomControl(f1+f3, cb1, caster, arr[i], f2,skill)
|
||||
else
|
||||
BattleUtil.RandomControl(f1, cb1, caster, arr[i], f2)
|
||||
BattleUtil.RandomControl(f1, cb1, caster, arr[i], f2,skill)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
@ -1472,7 +1452,7 @@ local effectList = {
|
|||
end
|
||||
return b
|
||||
end)
|
||||
BattleUtil.RandomControl(f1+f3*layer, ct, caster, target, f2)
|
||||
BattleUtil.RandomControl(f1+f3*layer, ct, caster, target, f2,skill)
|
||||
end)
|
||||
end,
|
||||
--添加[a]的[b]%护盾,持续[c]秒。为自身挂护盾印记,每层额外增加护盾值[d]%,印记最多[e]层。印记不显示。(增益印记,不可驱散)
|
||||
|
@ -1683,7 +1663,7 @@ local effectList = {
|
|||
end
|
||||
end)
|
||||
if hasBuff then
|
||||
BattleUtil.RandomControl(f2, ct, caster, target, f3)
|
||||
BattleUtil.RandomControl(f2, ct, caster, target, f3,skill)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
|
@ -1705,7 +1685,7 @@ local effectList = {
|
|||
end
|
||||
end)
|
||||
if hasBuff then
|
||||
BattleUtil.RandomControl(f2, ct, caster, target, f3)
|
||||
BattleUtil.RandomControl(f2, ct, caster, target, f3,skill)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
|
@ -1902,7 +1882,7 @@ local effectList = {
|
|||
else
|
||||
BattleUtil.CalDamage(skill, caster, target, dt, f1)
|
||||
end
|
||||
BattleUtil.RandomControl(f2, c1, caster, target, f4)
|
||||
BattleUtil.RandomControl(f2, c1, caster, target, f4,skill)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
@ -2216,7 +2196,7 @@ local effectList = {
|
|||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
BattleUtil.CalDamage(skill, caster, target, dt, f1)
|
||||
if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end,caster,dot) then
|
||||
BattleUtil.RandomControl(f2, ct, caster, target, f3)
|
||||
BattleUtil.RandomControl(f2, ct, caster, target, f3,skill)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
|
@ -2326,7 +2306,7 @@ local effectList = {
|
|||
BattleUtil.CalDamage(skill, caster, target, dt, f1)
|
||||
--伤害命中才会给目标上buff
|
||||
if skill and skill:CheckTargetIsHit(target) then
|
||||
BattleUtil.RandomControl(pro1,ctrl, caster, target,r1)
|
||||
BattleUtil.RandomControl(pro1,ctrl, caster, target,r1,skill)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
|
@ -2471,11 +2451,13 @@ local effectList = {
|
|||
value=0
|
||||
end
|
||||
if damage-value>0 then
|
||||
if target.bloodShield then
|
||||
target.bloodShield:AddValue(damage-value)
|
||||
else
|
||||
target:AddBuff(Buff.Create(caster,BuffName.Blood,0,damage-value))
|
||||
end
|
||||
if not target.isBanBlood then
|
||||
if target.bloodShield then
|
||||
target.bloodShield:AddValue(damage-value)
|
||||
else
|
||||
target:AddBuff(Buff.Create(caster,BuffName.Blood,0,damage-value))
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
|
@ -1,31 +1,6 @@
|
|||
local floor = math.floor
|
||||
local max = math.max
|
||||
local min = math.min
|
||||
--local RoleDataName = RoleDataName
|
||||
--local BattleLogic = BattleLogic
|
||||
--local BattleUtil = BattleUtil
|
||||
--local BattleEventName = BattleEventName
|
||||
--local BuffName = BuffName
|
||||
|
||||
--属性编号
|
||||
-- local BattlePropList = {
|
||||
-- RoleDataName.Attack,
|
||||
-- RoleDataName.PhysicalDefence,
|
||||
-- RoleDataName.MagicDefence,
|
||||
-- RoleDataName.Speed,
|
||||
-- RoleDataName.DamageBocusFactor,
|
||||
-- RoleDataName.DamageReduceFactor,
|
||||
-- RoleDataName.Hit,
|
||||
-- RoleDataName.Dodge,
|
||||
-- RoleDataName.Crit,
|
||||
-- RoleDataName.CritDamageFactor,
|
||||
-- RoleDataName.TreatFacter,
|
||||
-- RoleDataName.MaxHp,
|
||||
-- RoleDataName.Hp,
|
||||
-- RoleDataName.CureFacter,
|
||||
-- RoleDataName.Tenacity,
|
||||
-- RoleDataName.InitRage,
|
||||
-- }
|
||||
PassiveManager = {}
|
||||
PassiveManager.passiveCountList = {
|
||||
[0] = {},
|
||||
|
@ -328,22 +303,7 @@ local passivityList = {
|
|||
--免疫[a]属性伤害。
|
||||
--a[属性类型]
|
||||
[15] = function(role, args)
|
||||
local pt = args[1]
|
||||
local elementDamageReduceFactor
|
||||
if pt == 1 then
|
||||
elementDamageReduceFactor = RoleDataName.FireDamageReduceFactor
|
||||
elseif pt == 2 then
|
||||
elementDamageReduceFactor = RoleDataName.WindDamageReduceFactor
|
||||
elseif pt == 3 then
|
||||
elementDamageReduceFactor = RoleDataName.IceDamageReduceFactor
|
||||
elseif pt == 4 then
|
||||
elementDamageReduceFactor = RoleDataName.LandDamageReduceFactor
|
||||
elseif pt == 5 then
|
||||
elementDamageReduceFactor = RoleDataName.LightDamageReduceFactor
|
||||
elseif pt == 6 then
|
||||
elementDamageReduceFactor = RoleDataName.DarkDamageReduceFactor
|
||||
end
|
||||
role.data:AddValue(elementDamageReduceFactor, 10000)
|
||||
-- TODO:原有老被动已无法使用
|
||||
end,
|
||||
|
||||
--发动技能后,[a]的概率将[b]*[c]算作[d]计算,持续[e]秒。
|
||||
|
@ -1373,7 +1333,7 @@ local passivityList = {
|
|||
|
||||
local OnPassiveCriting = function(crit,skill)
|
||||
BattleUtil.RandomAction(f1, function ()
|
||||
crit(role:GetRoleData(RoleDataName.CritDamageFactor)+f2)
|
||||
crit(role:GetRoleData(RoleDataName.CritDamageBonus)+f2)
|
||||
end)
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveCriting, OnPassiveCriting,nil,nil,role)
|
||||
|
@ -2058,31 +2018,39 @@ local passivityList = {
|
|||
end,
|
||||
|
||||
|
||||
-- 战斗第[a]回合造成伤害必定暴击
|
||||
-- a[int]
|
||||
-- 战斗第[a]回合造成伤害必定暴击,[b]是否包含前面的回合
|
||||
-- a[int],b[int 0:不包含 1:包含]
|
||||
[112] = function(role, args,id,judge)
|
||||
local i1 = args[1]
|
||||
local type = args[2]
|
||||
if not type then
|
||||
type=0
|
||||
end
|
||||
local function onRoleDamageAfter(target)
|
||||
target.isFlagCrit = false
|
||||
role.Event:RemoveEvent(BattleEventName.RoleDamageAfter, onRoleDamageAfter)
|
||||
end
|
||||
local function onRoleDamageBefore(target, factorFunc, damageType, skill)
|
||||
role.Event:AddEvent(BattleEventName.RoleDamageAfter, onRoleDamageAfter,nil,nil,role)
|
||||
local function onRoleDamageBefore(critFunc,atkRole,defRole,skill)
|
||||
if atkRole~=role then
|
||||
return
|
||||
end
|
||||
if not skill then
|
||||
return
|
||||
end
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
--处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing
|
||||
if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 and judge==1 then
|
||||
return
|
||||
end
|
||||
if BattleLogic.GetCurRound() == i1 then
|
||||
target.isFlagCrit = true
|
||||
role.Event:AddEvent(BattleEventName.RoleDamageAfter, onRoleDamageAfter,nil,nil,role)
|
||||
|
||||
local curRound=BattleLogic.GetCurRound()
|
||||
LogError("currround=="..curRound.." il=="..i1.." type=="..type)
|
||||
if (curRound== i1 and type==0) or (curRound<=i1 and type==1) then
|
||||
LogError("1111111111")
|
||||
defRole.isFlagCrit = true
|
||||
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleDamageBefore, onRoleDamageBefore,nil,nil,role)
|
||||
BattleLogic.Event:AddEvent(BattleEventName.TemporaryChangeCrit, onRoleDamageBefore,nil,nil,role)
|
||||
end,
|
||||
|
||||
|
||||
|
@ -4364,7 +4332,7 @@ local passivityList = {
|
|||
local i1 = args[1]
|
||||
local f1 = args[2]
|
||||
BattleUtil.CalRage(role,role,i1,CountTypeName.Add)
|
||||
local function onPassiveSeckill(func)
|
||||
local function onPassiveSeckill(func,defRole)
|
||||
local isBoss=BattleUtil.CheckIsBoss(defRole)
|
||||
if isBoss then
|
||||
return
|
||||
|
@ -5017,10 +4985,6 @@ local passivityList = {
|
|||
role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging,nil,nil,role)
|
||||
end,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- 同阵营只生效一次
|
||||
-- 敌方武将[c]改变[a]的[b]
|
||||
-- a[float],b[属性],c[改变类型]
|
||||
|
@ -5688,11 +5652,13 @@ local passivityList = {
|
|||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role)
|
||||
end,
|
||||
--技能追加的普攻额外造成目标[a][b]%的伤害。
|
||||
--a[int 属性id] b[float]
|
||||
--技能追加的普攻额外造成目标[a][b]%的伤害。,生命每下降[c]%,额外生命百分比加[d]%(c d 不填不增加)
|
||||
--a[int 属性id] b[float],c[float],d[float]
|
||||
[258]=function(role,args,id,judge)
|
||||
local f1 = args[1]
|
||||
local dt = args[2]
|
||||
local p1 = args[3]
|
||||
local p2 = args[4]
|
||||
-- 直接伤害后
|
||||
local onPassiveDamaging = function(func, defRole, damage,skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
|
@ -5703,16 +5669,21 @@ local passivityList = {
|
|||
if (f1==12 or f1==13) and BattleUtil.CheckIsBoss(defRole) then
|
||||
return
|
||||
end
|
||||
if (f1==12 or f1==13) and p1 and p2 and p1~=0 and p2~=0 then
|
||||
local levelDamage = floor(defRole:GetRoleData(RoleDataName.MaxHp)*p1)
|
||||
local lostDamage = defRole:GetRoleData(RoleDataName.MaxHp) - defRole:GetRoleData(RoleDataName.Hp)
|
||||
local level = floor(lostDamage/levelDamage)
|
||||
dt=dt+(level*p2)
|
||||
end
|
||||
local val = -floor(BattleUtil.FP_Mul(dt, defRole:GetRoleData(BattlePropList[f1])))
|
||||
if f1==12 or f1==13 then
|
||||
BattleUtil.FinalDamage(nil,role,defRole,-val)
|
||||
BattleUtil.FinalDamageCountShield(nil,role,defRole,-val)
|
||||
else
|
||||
if func then
|
||||
func(val)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
dt=args[2]
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role)
|
||||
|
@ -5937,14 +5908,17 @@ local passivityList = {
|
|||
|
||||
role.Event:AddEvent(BattleEventName.PassiveDamaging,passiveBeBeDamage,nil,nil,role)
|
||||
end,
|
||||
--技能击中受到[a,控制效果]的目标,会额外降低[b]点怒气,额外造成其[c]属性[d]%的间接伤害
|
||||
-- a[int 控制效果]b[int],c[int 属性],d[float]
|
||||
--技能击中受到[a,控制效果]的目标,会额外降低[b]点怒气,额外造成其[c]属性[d]%的间接伤害,控制效果的添加条件[e](e: 0 不限制 1:自身)
|
||||
-- a[int 控制效果]b[int],c[int 属性],d[float],e[int]
|
||||
[267]=function(role,args,id,judge)
|
||||
local dot=args[1]
|
||||
local i1 = args[2]
|
||||
local pro = args[3]
|
||||
local v1 = args[4]
|
||||
--defRole, damage, bCrit, finalDmg, damageType, skill
|
||||
local limitType = args[5]
|
||||
if not limitType then
|
||||
limitType=0
|
||||
end
|
||||
local OnRoleHit = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
|
@ -5956,12 +5930,12 @@ local passivityList = {
|
|||
end
|
||||
local num=0
|
||||
for key, value in pairs(list) do
|
||||
local isHave=BattleLogic.BuffMgr:HasBuff(value, BuffName.Control, function(buff) return buff.ctrlType == dot end)
|
||||
local isHave=BattleLogic.BuffMgr:HasBuff(value, BuffName.Control, function(buff) return buff.ctrlType == dot and (limitType==0 or (limitType==1 and buff.caster==role)) end)
|
||||
if isHave then
|
||||
if i1>0 then
|
||||
BattleUtil.CalRage(role, value, i1, CountTypeName.Sub)
|
||||
end
|
||||
if pro and v1 then
|
||||
if pro and v1 and pro~=0 and v1~=0 then
|
||||
--如果是boss 并且额外伤害是根据最大生命则返回
|
||||
local isBoss=BattleUtil.CheckIsBoss(value)
|
||||
if isBoss and pro==12 then
|
||||
|
@ -6414,8 +6388,8 @@ local passivityList = {
|
|||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, OnRoundChange,nil,nil,role)
|
||||
end,
|
||||
--释放技能后,额外[a]改变[b]方怒气最少的[c]阵营目标[d]点怒气,目标人数[e](e 不填默认为 1人 填10为敌方燃烧数 )
|
||||
--a[int 改变类型],b[int 0:己方 1:敌方],c[int],d[int],e[int]
|
||||
--释放技能后,额外[a]改变[b]方怒气最少的[c]阵营目标[d]点怒气,目标人数[e](e 不填默认为 1人 填10为敌方燃烧数)属性[f]改变[g][h]% 持续[i]回合;属性[j]改变[k][l]% 持续[m]回合
|
||||
--a[int 改变类型],b[int 0:己方 1:敌方],c[int],d[int],e[int],f[int], g[int],h[float],i[int],j[int]k[int],l[float],m[int]
|
||||
[283]=function(role,args,id,judge)
|
||||
local ct=args[1]
|
||||
local camp=args[2]
|
||||
|
@ -6425,7 +6399,14 @@ local passivityList = {
|
|||
if not num then
|
||||
num=1
|
||||
end
|
||||
|
||||
local p1=args[6]
|
||||
local ct1=args[7]
|
||||
local f1=args[8]
|
||||
local r1=args[9]
|
||||
local p2=args[10]
|
||||
local ct2=args[11]
|
||||
local f2=args[12]
|
||||
local r2=args[13]
|
||||
local onSkillCastEnd=function(skill)
|
||||
local fireNum=0
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
|
@ -6459,6 +6440,12 @@ local passivityList = {
|
|||
for i = 1, #list do
|
||||
if i<=num then
|
||||
BattleUtil.CalRage(role, list[i], v1, ct)
|
||||
if p1 and ct1 and f1 and r1 then
|
||||
list[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, r1, BattlePropList[p1], f1,ct1))
|
||||
end
|
||||
if p2 and ct2 and f2 and r2 then
|
||||
list[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, r2, BattlePropList[p2], f2,ct2))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -7591,14 +7578,19 @@ local passivityList = {
|
|||
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,role)
|
||||
end,
|
||||
--[a]攻击时,如果目标处于持续伤害[b]状态,则有[c]%的概率使目标[d][e]回合
|
||||
--a[int 攻击类型 1:普攻 4:死亡技能]
|
||||
--[a]攻击时,如果目标处于持续伤害[b]状态,则有[c]%的概率使目标[d][e]回合,触发条件[f](f: 0/不填 灼烧目标, 1:没有条件)
|
||||
--a[int 攻击类型 1:普攻 4:死亡技能],b[int],c[flaot],d[int],e[int],f[int]
|
||||
[323]=function(role,args,id,judge)
|
||||
local st = args[1]
|
||||
local dt = args[2]
|
||||
local p1 = args[3]
|
||||
local ct = args[4]
|
||||
local round=args[5]
|
||||
local type=args[6]
|
||||
if not type then
|
||||
type=0
|
||||
end
|
||||
local ctrs={}
|
||||
local onRoleBeDamage=function (defRole, atkRole, damage, bCrit, finalDmg, damageType, dotType, skill)
|
||||
if atkRole and atkRole~=role then
|
||||
return
|
||||
|
@ -7609,11 +7601,25 @@ local passivityList = {
|
|||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT, function(buff) return buff.damageType == dt end,role,dt) then
|
||||
BattleUtil.RandomControl(p1,ct,role,defRole,round)
|
||||
end
|
||||
local isTrigger=false
|
||||
if type==0 then
|
||||
if BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT, function(buff) return buff.damageType == dt end,role,dt) then
|
||||
isTrigger=true
|
||||
end
|
||||
elseif type==1 then
|
||||
isTrigger=true
|
||||
end
|
||||
|
||||
if isTrigger and not ctrs[defRole.position] then
|
||||
BattleUtil.RandomControl(p1,ct,role,defRole,round)
|
||||
ctrs[defRole.position]=1
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.RoleBeDamaged,onRoleBeDamage,nil,nil,role)
|
||||
local onSkillCastEnd=function()
|
||||
ctrs={}
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,role)
|
||||
end,
|
||||
--释放技能怒气不足时,损失自身([a]-我方活着的[b]系神将数)%生命*不足怒气数 后释放技能
|
||||
--a[int],b[int]
|
||||
|
@ -8066,12 +8072,8 @@ local passivityList = {
|
|||
end
|
||||
local rDamage =floor(f1 * damage)
|
||||
|
||||
if role.bloodShield then
|
||||
role.bloodShield:AddValue(rDamage)
|
||||
else
|
||||
role:AddBuff(Buff.Create(role, BuffName.Blood,0, rDamage))
|
||||
end
|
||||
|
||||
BattleUtil.AddBlood(role,rDamage)
|
||||
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleBeHit, onBeHit,nil,nil,role)
|
||||
end,
|
||||
|
@ -8421,11 +8423,8 @@ local passivityList = {
|
|||
local onRoundChange=function(curRound)
|
||||
local val = floor(BattleUtil.FP_Mul(v1, role:GetRoleData(BattlePropList[pro])))
|
||||
--如果身上有御甲就添加御甲的值
|
||||
if role.bloodShield then
|
||||
role.bloodShield:AddValue(val)
|
||||
else--没有就上御甲buff
|
||||
role:AddBuff(Buff.Create(role, BuffName.Blood,0, val))
|
||||
end
|
||||
BattleUtil.AddBlood(role,val)
|
||||
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleTurnStart, onRoundChange,nil,nil,role)
|
||||
end,
|
||||
|
@ -8522,12 +8521,8 @@ local passivityList = {
|
|||
end
|
||||
local val = floor(BattleUtil.FP_Mul(v1, role:GetRoleData(BattlePropList[pro])))
|
||||
--如果身上有御甲就添加御甲的值
|
||||
if role.bloodShield then
|
||||
role.bloodShield:AddValue(val)
|
||||
else--没有就上御甲buff
|
||||
role:AddBuff(Buff.Create(role, BuffName.Blood,0, val))
|
||||
end
|
||||
time=time+1
|
||||
BattleUtil.AddBlood(role,val)
|
||||
time=time+1
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart,onRoundStart,nil,nil,role)
|
||||
end,
|
||||
|
@ -8755,14 +8750,18 @@ local passivityList = {
|
|||
|
||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging,nil,nil,role)
|
||||
end,
|
||||
--处于[a]类型[b]效果的目标,获得御甲时得效果改变[c][d]%,[e](e 1:自身释放)
|
||||
--a[int buff类型],b[int 具体类型],c[int 改变类型],d[float],e[int]
|
||||
--处于[a]类型[b]效果的目标,获得御甲时得效果改变[c][d]%,[e](e 1:自身释放),改变概率[f](f不填为100%,a填0:为没有buff限制)
|
||||
--a[int buff类型],b[int 具体类型],c[int 改变类型],d[float],e[int],f[float]
|
||||
[362]=function(role, args,id,judge)
|
||||
local type1 = args[1]
|
||||
local type2 = args[2]
|
||||
local ct = args[3]
|
||||
local v1 = args[4]
|
||||
local type3 = args[5]
|
||||
local p1 = args[6]
|
||||
if not p1 then
|
||||
p1=1
|
||||
end
|
||||
local onPassiveBlood=function(func,trigger,caster,value)
|
||||
if not func then
|
||||
return
|
||||
|
@ -8777,10 +8776,14 @@ local passivityList = {
|
|||
if BattleLogic.BuffMgr:HasBuff(trigger, type1, nil) then
|
||||
isPlay=true
|
||||
end
|
||||
elseif type1==0 then
|
||||
isPlay=true
|
||||
end
|
||||
if isPlay and func then
|
||||
local dd = BattleUtil.CountValue(value,v1, ct) - value
|
||||
func(floor(BattleUtil.ErrorCorrection(dd)))
|
||||
BattleUtil.RandomAction(p1,function()
|
||||
local dd = BattleUtil.CountValue(value,v1, ct) - value
|
||||
func(floor(BattleUtil.ErrorCorrection(dd)))
|
||||
end)
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BloodValuePassiveChange,onPassiveBlood,nil,nil,role)
|
||||
|
@ -8806,11 +8809,7 @@ local passivityList = {
|
|||
if list then
|
||||
local tv = floor(BattleUtil.ErrorCorrection(role:GetRoleData(BattlePropList[pro]) * f1))
|
||||
for _, r in ipairs(list) do
|
||||
if r.bloodShield then
|
||||
r.bloodShield:AddValue(tv)
|
||||
else
|
||||
r:AddBuff(Buff.Create(role, BuffName.Blood,0,tv))
|
||||
end
|
||||
BattleUtil.AddBlood(r,tv)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -9150,11 +9149,7 @@ local passivityList = {
|
|||
if skill.type == BattleSkillType.Special then
|
||||
role.Event:RemoveEvent(BattleEventName.RoleHit, OnHit)
|
||||
local value=floor(BattleUtil.ErrorCorrection(allDamage*f1))
|
||||
if role.bloodShield then
|
||||
role.bloodShield:AddValue(value)
|
||||
else
|
||||
role:AddBuff(Buff.Create(role, BuffName.Blood,0,value))
|
||||
end
|
||||
BattleUtil.AddBlood(role,value)
|
||||
-- 清空伤害记录
|
||||
allDamage = 0
|
||||
end
|
||||
|
@ -9273,6 +9268,445 @@ local passivityList = {
|
|||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleHit,onRoleHit,nil,nil,role)
|
||||
end,
|
||||
--受到处于[a][b]效果的目标的[c]类型攻击,则有[d]%的概率使目标[e][f][g]回合(c: 1:技能攻击)
|
||||
--a[int],b[int],c[int],d[float],e[int],f[int],g[int]
|
||||
[379]=function(role,args,id,judge)
|
||||
local t1 = args[1]
|
||||
local t2 = args[2]
|
||||
local t3 = args[3]
|
||||
local pro = args[4]
|
||||
local t4=args[5]
|
||||
local t5=args[6]
|
||||
local round=args[7]
|
||||
|
||||
local onRoleBeDamage=function (atkRole, damage, bCrit, finalDmg, damageType, dotType, skill)
|
||||
if atkRole and atkRole.camp==role.camp then
|
||||
return
|
||||
end
|
||||
if not skill or skill.type==BattleSkillType.Monster then
|
||||
return
|
||||
end
|
||||
if skill.type~=BattleSkillType.Special and skill.type~=BattleSkillType.Extra then
|
||||
return
|
||||
end
|
||||
|
||||
local isTrigger=false
|
||||
if BattleLogic.BuffMgr:HasBuff(atkRole, t1, function(buff) return buff.damageType == t2 end,role,t2) then
|
||||
isTrigger=true
|
||||
end
|
||||
if isTrigger then
|
||||
if t4==BuffName.Control then
|
||||
BattleUtil.RandomControl(pro,t5,role,atkRole,round)
|
||||
end
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleBeDamaged,onRoleBeDamage,nil,nil,role)
|
||||
end,
|
||||
|
||||
-- 死亡时[a]%斩杀生命低于[b]%,且处于[c]类型[d]效果的敌人
|
||||
-- a[float],b[float],c[int],d[int]
|
||||
[380] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local p1 = args[2]
|
||||
local t1 = args[3]
|
||||
local t2 = args[4]
|
||||
local onRoleDead = function()
|
||||
local list = RoleManager.Query(function(v) return v.camp ~= role.camp end)
|
||||
BattleUtil.RandomAction(f1,function()
|
||||
for i = 1, #list do
|
||||
if BattleLogic.BuffMgr:HasBuff(list[i], t1, function (buff) return buff.damageType==t2 end) then
|
||||
local isBoss=BattleUtil.CheckIsBoss(list[i])
|
||||
if not isBoss then
|
||||
local ft = list[i]:GetRoleData(RoleDataName.Hp)/list[i]:GetRoleData(RoleDataName.MaxHp)
|
||||
if ft < p1 then
|
||||
-- 秒杀
|
||||
BattleUtil.Seckill(nil, role,list[i])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleDead, onRoleDead,nil,nil,role)
|
||||
end,
|
||||
--被自身添加[a]类型[b]效果的目标,己方[c]系神将对其暴击率改变[d][e]%,且暴击必定命中
|
||||
--a[int],b[int],c[int],d[int],e[float]
|
||||
[381]=function(role, args,id,judge)
|
||||
local t1 = args[1]
|
||||
local t2 = args[2]
|
||||
local ele = args[3]
|
||||
local ct = args[4]
|
||||
local v1 = args[5]
|
||||
local changeCrit=function(func,atkRole,defRole,skill)
|
||||
if atkRole.camp~=role.camp or atkRole.element~=ele then
|
||||
return
|
||||
end
|
||||
if not BattleLogic.BuffMgr:HasBuff(defRole, t1, function (buff) return buff.ctrlType==t2 and buff.caster==role end) then
|
||||
return
|
||||
end
|
||||
if func then
|
||||
func(v1,ct,true)
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.TemporaryChangeCrit,changeCrit,nil,nil,role)
|
||||
end,
|
||||
--技能对自身释放[a]类型buff [b]成功后,有[c]%概率控制[d][e]回合;每回合最多触发[f]次,具体控制效果有[g][h][i][j]
|
||||
--a[int],b[int 0:失败/成功 1:只有成功],c[float],d[int],e[int],f[int],g[int],h[int],i[int]
|
||||
[382]=function(role, args,id,judge)
|
||||
local ctrls={}
|
||||
local t1 = args[1]
|
||||
local t2 = args[2]
|
||||
local pro = args[3]
|
||||
local t3 = args[4]
|
||||
local r1 = args[5]
|
||||
local time = args[6]
|
||||
local v1 = args[7]
|
||||
if v1 then
|
||||
table.insert(ctrls,v1)
|
||||
end
|
||||
local v2 = args[8]
|
||||
if v2 then
|
||||
table.insert(ctrls,v2)
|
||||
end
|
||||
local v3 = args[9]
|
||||
if v3 then
|
||||
table.insert(ctrls,v3)
|
||||
end
|
||||
local v4 = args[10]
|
||||
if v4 then
|
||||
table.insert(ctrls,v4)
|
||||
end
|
||||
local triggerTime=0
|
||||
local addBuff=function(buff,isAdd,caster,target,skill)
|
||||
if not skill then
|
||||
return
|
||||
end
|
||||
if time==triggerTime then
|
||||
return
|
||||
end
|
||||
if not BattleUtil.ChecklistIsContainValue(ctrls,buff.ctrlType) then
|
||||
return
|
||||
end
|
||||
if t2==1 and not isAdd then
|
||||
return
|
||||
end
|
||||
BattleUtil.RandomControl(pro,t3,role,caster,r1)
|
||||
triggerTime=triggerTime+1
|
||||
end
|
||||
|
||||
BattleLogic.Event:AddEvent(BattleEventName.RoleAddCtrlBuff,addBuff,nil,nil,role)
|
||||
|
||||
local onRoundChange=function()
|
||||
triggerTime=0
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,onRoundChange,nil,nil,role)
|
||||
end,
|
||||
--目标存在御甲,追击的普攻对御甲额外造成[a]倍伤害,不存在御甲,追击的普攻额外造成目标[b][c]%的伤害
|
||||
--【御甲不足以抵扣a倍伤害 对神将造成血量伤害=([d]属性*[e]-御甲值)/[f]】
|
||||
--a[int],b[int],c[float],d[int],e[int],f[int]
|
||||
[383]=function(role, args,id,judge)
|
||||
local d1 = args[1]
|
||||
local p1 = args[2]
|
||||
local v1 = args[3]
|
||||
local p2 = args[4]
|
||||
local v2 = args[5]
|
||||
local d2 = args[6]
|
||||
local passiveDmg=function(func, defRole, damage, skill, dotType, bCrit,damageType, dotType,isDirect)
|
||||
if not skill then
|
||||
return
|
||||
end
|
||||
if skill.type~=BattleSkillType.Normal or not skill.isAdd then
|
||||
return
|
||||
end
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if defRole.bloodShield==nil or defRole.bloodShield.bloodValue==0 then
|
||||
local isBoss=BattleUtil.CheckIsBoss(defRole)
|
||||
if isBoss and p1==12 then
|
||||
return
|
||||
end
|
||||
local val = floor(BattleUtil.FP_Mul(v1, defRole:GetRoleData(BattlePropList[p1])))
|
||||
BattleUtil.FinalDamageCountShield(nil,role, defRole, val)
|
||||
else
|
||||
local jia=defRole.bloodShield.bloodValue
|
||||
if damage*d1>jia then
|
||||
local aaa=(role:GetRoleData(BattlePropList[p2])*v2-jia)/d2
|
||||
func(-floor(aaa))
|
||||
else
|
||||
func(-floor(damage*(d1-1)))
|
||||
end
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, passiveDmg,nil,nil,role)
|
||||
end,
|
||||
-- 技能治疗的目标[a]属性[b]改变[c]%,持续[d]回合
|
||||
-- a[int],b[改变类型],c[float],d[int]
|
||||
[384] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local ct = args[2]
|
||||
local v1 = args[3]
|
||||
local round = args[4]
|
||||
local onPassiveTreatingFactor = function(func, target)
|
||||
target:AddBuff(Buff.Create(role, BuffName.PropertyChange, round, BattlePropList[f1], v1,ct))
|
||||
end
|
||||
|
||||
local function onSkillCast(skill)
|
||||
if skill then
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor,nil,nil,role)
|
||||
end
|
||||
end
|
||||
local function onSkillCastEnd(skill)
|
||||
if skill then
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor)
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role)
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role)
|
||||
end,
|
||||
-- 技能目标每[a]改变[b]个,暴击率增加[c]%,[d]改变
|
||||
-- a[改变类型],b[int],c[float],d[改变类型]
|
||||
[385] = function(role, args,id,judge)
|
||||
local ct = args[1]
|
||||
local i1 = args[2]
|
||||
local f1 = args[3]
|
||||
local ct2 = args[4]
|
||||
|
||||
-- 每次释放技能时提前计算额外加成的伤害
|
||||
local extra = 0
|
||||
|
||||
|
||||
local changeCrit=function(func,atkRole,defRole,skill)
|
||||
if not skill or skill.type~=BattleSkillType.Special then
|
||||
return
|
||||
end
|
||||
if atkRole~=role then
|
||||
return
|
||||
end
|
||||
if func then
|
||||
func(extra,ct2,false)
|
||||
end
|
||||
end
|
||||
local onSkillCast = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
extra = 0
|
||||
if skill and skill.type == BattleSkillType.Special then
|
||||
-- 改变值 = 技能最大目标数 - 当前目标数
|
||||
local maxNum = skill:GetMaxTargetNum()
|
||||
local curNum = #skill:GetDirectTargets()
|
||||
local lessNum = max(maxNum - curNum, 0)
|
||||
local level = math.floor(lessNum/i1)
|
||||
extra = BattleUtil.ErrorCorrection(level * f1)
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.TemporaryChangeCrit,changeCrit,nil,nil,role)
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role)
|
||||
|
||||
local onSkillCastEnd=function()
|
||||
BattleLogic.Event:RemoveEvent(BattleEventName.TemporaryChangeCrit,changeCrit,nil,nil,role)
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,role)
|
||||
|
||||
end,
|
||||
--释放技能时,如果目标怒气不足[a]点,每少[b]技能暴击伤害额外[c] [d]%
|
||||
-- a[int,怒气值],b[int],c[改变类型],d[float]
|
||||
[386]=function(role,args,id,judge)
|
||||
local anger = args[1]
|
||||
local num = args[2]
|
||||
local type = args[3]
|
||||
local v1 = args[4]
|
||||
local onPassiveDamaging = function(func, defRole, damage,skill,dotType,bcrit)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if not bcrit then
|
||||
return
|
||||
end
|
||||
--怒气小于规定值
|
||||
if defRole.Rage>=anger then
|
||||
return
|
||||
end
|
||||
local add=floor((anger-defRole.Rage)/num)*v1
|
||||
if skill and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill ) then
|
||||
local dmgDeduction = damage - floor(BattleUtil.ErrorCorrection(BattleUtil.CountValue(damage,add,type)))
|
||||
if func then func(dmgDeduction) end
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role)
|
||||
end,
|
||||
--技能追加的普攻额外造成目标[a][b]%的伤害,如果放技能前自身怒气大于目标,额外生命百分比加[c]%;小于等于目标添加禁御甲,持续[d]回合
|
||||
--a[int 属性id] b[float],c[float],d[float]
|
||||
[387]=function(role,args,id,judge)
|
||||
local f1 = args[1]
|
||||
local dt = args[2]
|
||||
local p1 = args[3]
|
||||
local p2 = args[4]
|
||||
local haveRage=0
|
||||
-- 直接伤害后
|
||||
local onPassiveDamaging = function(func, defRole, damage,skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if skill and skill.type == BattleSkillType.Normal and skill.isAdd and skill.owner==role then
|
||||
--如果是boss 并且额外伤害是根据最大生命则返回
|
||||
if (f1==12 or f1==13) and BattleUtil.CheckIsBoss(defRole) then
|
||||
return
|
||||
end
|
||||
if (f1==12 or f1==13) and p1 then
|
||||
if haveRage>defRole.Rage then
|
||||
dt=dt+p1
|
||||
else
|
||||
defRole:AddBuff(Buff.Create(role, BuffName.BanBlood, p2))
|
||||
end
|
||||
end
|
||||
local val = -floor(BattleUtil.FP_Mul(dt, defRole:GetRoleData(BattlePropList[f1])))
|
||||
if f1==12 or f1==13 then
|
||||
BattleUtil.FinalDamageCountShield(nil,role,defRole,-val)
|
||||
else
|
||||
if func then
|
||||
func(val)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role)
|
||||
local onSkillCast=function(caster)
|
||||
haveRage=caster.Rage
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleTurnStart,onSkillCast,nil,nil,role)
|
||||
end,
|
||||
--非[a]职业神将[b]怒气时,有[c]概率使目标[d]属性[e]改变[f]%,持续[g]回合
|
||||
--a[int],b[int],c[float],d[int],e[int],f[float],g[int]
|
||||
[388]=function(role,args,id,judge)
|
||||
local prof = args[1]
|
||||
local ct1 = args[2]
|
||||
local pro = args[3]
|
||||
local p1 = args[4]
|
||||
local ct2 = args[5]
|
||||
local v1 = args[6]
|
||||
local round = args[7]
|
||||
local onRageChange = function(caster, target, deltaRage, countType, value)
|
||||
if caster~=role then
|
||||
return
|
||||
end
|
||||
|
||||
if countType~=ct1 then
|
||||
return
|
||||
end
|
||||
if target.camp~=role.camp then
|
||||
return
|
||||
end
|
||||
if prof~=0 and caster.job==prof then
|
||||
return
|
||||
end
|
||||
|
||||
BattleUtil.RandomAction(pro,function()
|
||||
target:AddBuff(Buff.Create(role, BuffName.PropertyChange,round, BattlePropList[p1],v1, ct2))
|
||||
end)
|
||||
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.RecordRageChange, onRageChange,nil,nil,role)
|
||||
end,
|
||||
--暴击时[a]%概率使爆伤改变[b][c]%
|
||||
--a[float],b[int],c[float]
|
||||
[389]=function(role,args,id,judge)
|
||||
local pro=args[1]
|
||||
local ct = args[2]
|
||||
local v1 = args[3]
|
||||
local addCritDamageFa=function(func)
|
||||
BattleUtil.RandomAction(pro,function()
|
||||
if func then
|
||||
func(v1,ct)
|
||||
end
|
||||
end)
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveAddCritDamageFactor,addCritDamageFa,nil,nil,role)
|
||||
end,
|
||||
|
||||
--释放技能时[a]%概率 改变[b]自身无视目标的[c]类型buff的免疫概率
|
||||
--a[float],b[int],c[int]
|
||||
[390]=function(role,args,id,judge)
|
||||
local pro=args[1]
|
||||
local ct = args[2]
|
||||
local v1 = args[3]
|
||||
local addCritDamageFa=function(func,buff)
|
||||
|
||||
if buff and buff.type~=v1 then
|
||||
return
|
||||
end
|
||||
if func then
|
||||
func(pro,ct)
|
||||
end
|
||||
end
|
||||
|
||||
local OnSkillCast = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill then
|
||||
role.Event:AddEvent(BattleEventName.PassiveChangeIgnoreImmuneValue,addCritDamageFa,nil,nil,role)
|
||||
end
|
||||
end
|
||||
local OnSkillCastEnd = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill then
|
||||
role.Event:RemoveEvent(BattleEventName.PassiveChangeIgnoreImmuneValue,addCritDamageFa,nil,nil,role)
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast,nil,nil,role)
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role)
|
||||
end,
|
||||
|
||||
--释放技能时[a]%概率 清除目标一个减异效果
|
||||
--a[float]
|
||||
[391]=function(role,args,id,judge)
|
||||
local pro=args[1]
|
||||
local onRoleTreat=function(targetRole, treat, baseTreat,skill)
|
||||
if not skill then
|
||||
return
|
||||
end
|
||||
BattleUtil.RandomAction(pro, function()
|
||||
local list=BattleLogic.BuffMgr:GetAllBuffByFunc(function(buff) return buff.caster.camp~=targetRole.camp and buff.target==targetRole end)
|
||||
local len=BattleUtil.LengthOfTable(list)
|
||||
if list and len>0 then
|
||||
local index=Random.RangeInt(1,len)
|
||||
BattleLogic.BuffMgr:ClearBuff(targetRole, function (buff)
|
||||
return buff==list[index]
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local OnSkillCast = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill then
|
||||
role.Event:AddEvent(BattleEventName.RoleTreat,onRoleTreat,nil,nil,role)
|
||||
end
|
||||
end
|
||||
local OnSkillCastEnd = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill then
|
||||
role.Event:RemoveEvent(BattleEventName.RoleTreat,onRoleTreat,nil,nil,role)
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast,nil,nil,role)
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role)
|
||||
end,
|
||||
|
||||
}
|
||||
return passivityList
|
|
@ -0,0 +1,33 @@
|
|||
BanBlood = Buff:New()
|
||||
|
||||
--初始化Buff,通过传入一些自定义参数控制成长相关的数值
|
||||
function BanBlood:SetData(...)
|
||||
|
||||
-- 刷新排序等级
|
||||
self.sort = 4
|
||||
end
|
||||
|
||||
|
||||
--初始化后调用一次
|
||||
function BanBlood:OnStart()
|
||||
self.target.isBanBlood = true
|
||||
|
||||
end
|
||||
|
||||
--间隔N帧触发,返回true时表示继续触发,返回false立刻触发OnEnd
|
||||
function BanBlood:OnTrigger()
|
||||
return true
|
||||
end
|
||||
|
||||
--效果结束时调用一次
|
||||
function BanBlood:OnEnd()
|
||||
self.target.isBanBlood = false
|
||||
|
||||
end
|
||||
|
||||
--只有当cover字段为true时触发,返回true则被新效果覆盖
|
||||
function BanBlood:OnCover(newBuff)
|
||||
return true
|
||||
end
|
||||
|
||||
return BanBlood
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 18cb21cb8f3fd3042af24720c82d4c26
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -114,6 +114,9 @@ function this.OnBuffAdd(caster,target,buff)
|
|||
if caster and target and buff then
|
||||
if caster.camp==0 and buff.type==BuffName.Control then
|
||||
local type=buff.ctrlType
|
||||
if type==4 then
|
||||
return
|
||||
end
|
||||
if ctrlNumList[type] then
|
||||
ctrlNumList[type]=ctrlNumList[type]+1
|
||||
else
|
||||
|
|
|
@ -180,6 +180,11 @@ BattleEventName = {
|
|||
CheckLiZhanZhiQu = indexAdd(),--检测历战之躯
|
||||
SkillCastCostRageEnd = indexAdd(), --技能释放最后扣除怒气
|
||||
BloodValuePassiveChange = indexAdd(),--被动修改御甲值
|
||||
TemporaryChangeCrit = indexAdd(),--临时改变暴击率
|
||||
RoleAddCtrlBuff = indexAdd(),--角色添加控制类buff
|
||||
CastRageBrfore = indexAdd(),--扣除怒气之前
|
||||
PassiveAddCritDamageFactor = indexAdd(), --被动增加爆伤系数
|
||||
PassiveChangeIgnoreImmuneValue = indexAdd(),--被动修改无视
|
||||
}
|
||||
|
||||
BattleMaxFrame = 1000000
|
||||
|
@ -187,35 +192,64 @@ BattleMaxFrame = 1000000
|
|||
|
||||
index = 0
|
||||
RoleDataName = {
|
||||
Level = indexAdd(), --等级
|
||||
Hp = indexAdd(), --生命
|
||||
MaxHp = indexAdd(), --最大生命
|
||||
Attack = indexAdd(), --攻击力
|
||||
PhysicalDefence = indexAdd(),--护甲
|
||||
MagicDefence = indexAdd(),--魔抗
|
||||
Speed = indexAdd(),--速度
|
||||
Level = indexAdd(), --等级
|
||||
Hp = indexAdd(), --生命
|
||||
MaxHp = indexAdd(), --最大生命
|
||||
Attack = indexAdd(), --攻击力
|
||||
PhysicalDefence = indexAdd(), --护甲
|
||||
MagicDefence = indexAdd(), --魔抗
|
||||
Speed = indexAdd(), --速度
|
||||
DamageBocusFactor = indexAdd(), --伤害加成系数(%)
|
||||
DamageReduceFactor = indexAdd(), --伤害减免系数(%)
|
||||
Hit = indexAdd(), --施法率(%)
|
||||
Hit = indexAdd(), --施法率(%)
|
||||
Dodge = indexAdd(), --后期基础施法率(%)
|
||||
Crit = indexAdd(), --暴击率(%)
|
||||
CritDamageFactor = indexAdd(), --暴击伤害系数(%)
|
||||
Crit = indexAdd(), --暴击率(%)
|
||||
CritDamageBonus = indexAdd(), --暴击伤害系数(%)
|
||||
Tenacity = indexAdd(), --抗暴率(%)
|
||||
TreatFacter = indexAdd(),--治疗加成系数(%)
|
||||
TreatFacter = indexAdd(), --治疗加成系数(%)
|
||||
CureFacter = indexAdd(),--受到治疗加成系数(%)
|
||||
TeamDamageBocusFactor = indexAdd(),--队伍伤害加成系数(%)
|
||||
TeamDamageReduceFactor = indexAdd(),--队伍伤害减免系数(%)
|
||||
FireDamageReduceFactor = indexAdd(), --火系伤害减免系数(%)
|
||||
WindDamageReduceFactor = indexAdd(), --风系伤害减免系数(%)
|
||||
IceDamageReduceFactor = indexAdd(), --冰系伤害减免系数(%)
|
||||
LandDamageReduceFactor = indexAdd(), --地系伤害减免系数(%)
|
||||
LightDamageReduceFactor = indexAdd(), --光系伤害减免系数(%)
|
||||
DarkDamageReduceFactor = indexAdd(), --暗系伤害减免系数(%)
|
||||
ElementDamageBocusFactor = indexAdd(), --属性伤害加成系数(%)
|
||||
RenBonus = indexAdd(), --人系伤害加成
|
||||
FoBonus = indexAdd(), --佛系伤害加成
|
||||
YaoBonus = indexAdd(), --妖系伤害加成
|
||||
DaoBonus = indexAdd(), --道系伤害加成
|
||||
RenReduce = indexAdd(), --人系伤害减免
|
||||
FoReduce = indexAdd(), --佛系伤害减免
|
||||
YaoReduce = indexAdd(), --妖系伤害减免
|
||||
DaoReduce = indexAdd(), --道系伤害减免
|
||||
CritDamageReduce = indexAdd(), --暴击伤害减免
|
||||
InitRage = indexAdd(), --初始怒气值
|
||||
|
||||
}
|
||||
|
||||
-- 战斗表属性id对应战斗中属性数据
|
||||
BattlePropList = {
|
||||
RoleDataName.Attack,
|
||||
RoleDataName.PhysicalDefence,
|
||||
RoleDataName.MagicDefence,
|
||||
RoleDataName.Speed,
|
||||
RoleDataName.DamageBocusFactor,
|
||||
RoleDataName.DamageReduceFactor,
|
||||
RoleDataName.Hit,
|
||||
RoleDataName.Dodge,
|
||||
RoleDataName.Crit,
|
||||
RoleDataName.CritDamageBonus,
|
||||
RoleDataName.TreatFacter,
|
||||
RoleDataName.MaxHp,
|
||||
RoleDataName.Hp,
|
||||
RoleDataName.CureFacter,
|
||||
RoleDataName.Tenacity,
|
||||
RoleDataName.InitRage,
|
||||
RoleDataName.RenBonus,
|
||||
RoleDataName.FoBonus,
|
||||
RoleDataName.YaoBonus,
|
||||
RoleDataName.DaoBonus,
|
||||
RoleDataName.RenReduce,
|
||||
RoleDataName.FoReduce,
|
||||
RoleDataName.YaoReduce,
|
||||
RoleDataName.DaoReduce,
|
||||
RoleDataName.CritDamageReduce,
|
||||
}
|
||||
|
||||
|
||||
BuffName = {
|
||||
PropertyChange = 1,
|
||||
Control = 2,
|
||||
|
@ -230,6 +264,7 @@ BuffName = {
|
|||
Aura = 11,
|
||||
Brand = 12,
|
||||
Blood = 13,
|
||||
BanBlood = 14,
|
||||
}
|
||||
|
||||
DotType = {
|
||||
|
@ -297,27 +332,6 @@ skill6={100923,0.15,1.5,1,{260004,{126,0.48,2,4,1,0,4,12,0}}},
|
|||
}
|
||||
|
||||
|
||||
|
||||
-- 战斗表属性id对应战斗中属性数据
|
||||
BattlePropList = {
|
||||
RoleDataName.Attack,
|
||||
RoleDataName.PhysicalDefence,
|
||||
RoleDataName.MagicDefence,
|
||||
RoleDataName.Speed,
|
||||
RoleDataName.DamageBocusFactor,
|
||||
RoleDataName.DamageReduceFactor,
|
||||
RoleDataName.Hit,
|
||||
RoleDataName.Dodge,
|
||||
RoleDataName.Crit,
|
||||
RoleDataName.CritDamageFactor,
|
||||
RoleDataName.TreatFacter,
|
||||
RoleDataName.MaxHp,
|
||||
RoleDataName.Hp,
|
||||
RoleDataName.CureFacter,
|
||||
RoleDataName.Tenacity,
|
||||
RoleDataName.InitRage,
|
||||
}
|
||||
|
||||
CurseTypeName = {
|
||||
ShareDamage = 1,
|
||||
}
|
||||
|
@ -349,4 +363,19 @@ BattleArtFontType = {
|
|||
Immune = 1, -- 免疫文字
|
||||
Shield = 2, --破盾文字
|
||||
clear = 3, --清除文字
|
||||
Blood = 4, --禁甲文字
|
||||
}
|
||||
|
||||
|
||||
BattleMieProp = {
|
||||
[BattleRoleElementType.REN] = RoleDataName.RenBonus,
|
||||
[BattleRoleElementType.FO] = RoleDataName.FoBonus,
|
||||
[BattleRoleElementType.YAO] = RoleDataName.YaoBonus,
|
||||
[BattleRoleElementType.DAO] = RoleDataName.DaoBonus
|
||||
}
|
||||
BattleKangProp = {
|
||||
[BattleRoleElementType.REN] = RoleDataName.RenReduce,
|
||||
[BattleRoleElementType.FO] = RoleDataName.FoReduce,
|
||||
[BattleRoleElementType.YAO] = RoleDataName.YaoReduce,
|
||||
[BattleRoleElementType.DAO] = RoleDataName.DaoReduce
|
||||
}
|
|
@ -607,15 +607,6 @@ function BattleUtil.ApplyDamage(skill, atkRole, defRole, damage, bCrit, damageTy
|
|||
bCrit = bCrit or false
|
||||
damageType = damageType or 0
|
||||
|
||||
-- if atkRole.isTeam then
|
||||
-- --max(技能基础伤害*(1+已方异妖伤害加成-目标异妖伤害减免),30%×技能基础伤害)
|
||||
-- local arr = RoleManager.Query(function (r) return r.camp == atkRole.camp end)
|
||||
-- local n = 0
|
||||
-- for i=1, #arr do
|
||||
-- n = n + arr[i]:GetRoleData(RoleDataName.TeamDamageBocusFactor)
|
||||
-- end
|
||||
-- damage = floor(max(damage * (1 + n / #arr - defRole:GetRoleData(RoleDataName.TeamDamageReduceFactor)), 0.3 * damage))
|
||||
-- end
|
||||
-- 计算护盾减伤
|
||||
|
||||
damage = BattleUtil.CalShield(atkRole, defRole, damage,skill)
|
||||
|
@ -906,13 +897,42 @@ function BattleUtil.CalDamage(skill, atkRole, defRole, damageType, baseFactor, i
|
|||
if defRole.type == BattleUnitType.Monster or defRole.type == BattleUnitType.Player then
|
||||
return
|
||||
end
|
||||
-- 判断是否命中
|
||||
if skill and not skill:CheckTargetIsHit(defRole) and atkRole.type==BattleUnitType.Role then
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.HitMiss, atkRole, defRole, skill)
|
||||
atkRole.Event:DispatchEvent(BattleEventName.HitMiss, defRole, skill)
|
||||
defRole.Event:DispatchEvent(BattleEventName.BeHitMiss, atkRole, skill)
|
||||
return 0
|
||||
|
||||
-- 是否暴击: 暴击率 = 自身暴击率 - 对方抗暴率
|
||||
local bCrit = false
|
||||
local critRandom = Random.Range01()
|
||||
--特殊处理 白骨精附加的普攻不会必定暴击
|
||||
local mustCrit=atkRole.mustCrit
|
||||
if atkRole.roleId==10091 and skill and skill.type==BattleSkillType.Normal and skill.isAdd then
|
||||
mustCrit=false
|
||||
end
|
||||
local addCrit=0
|
||||
local isMustHit=false
|
||||
-- 计算被动对暴击概率的影响
|
||||
local critFunc = function(df, dt,hit)
|
||||
addCrit = BattleUtil.CountValue(addCrit, df, dt)
|
||||
isMustHit = hit
|
||||
end
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.TemporaryChangeCrit,critFunc,atkRole,defRole,skill)
|
||||
local critCondition = clamp(atkRole:GetRoleData(RoleDataName.Crit)+addCrit - defRole:GetRoleData(RoleDataName.Tenacity), 0, 1)
|
||||
bCrit = critRandom <= critCondition
|
||||
--处理达摩神魂被动必定命中
|
||||
if not bCrit or addCrit==0 then
|
||||
isMustHit=false
|
||||
end
|
||||
|
||||
bCrit =mustCrit or bCrit or defRole.isFlagCrit == true -- 必定暴击
|
||||
|
||||
-- 判断是否命中
|
||||
if not isMustHit then
|
||||
if (skill and not skill:CheckTargetIsHit(defRole) and atkRole.type==BattleUnitType.Role) then
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.HitMiss, atkRole, defRole, skill)
|
||||
atkRole.Event:DispatchEvent(BattleEventName.HitMiss, defRole, skill)
|
||||
defRole.Event:DispatchEvent(BattleEventName.BeHitMiss, atkRole, skill)
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
-- 如果是队伍技能,计算真实伤害,则damageType为伤害值
|
||||
if atkRole.isTeam and not defRole:IsDead() then
|
||||
return BattleUtil.ApplyDamage(skill, atkRole, defRole, damageType), false
|
||||
|
@ -942,18 +962,7 @@ function BattleUtil.CalDamage(skill, atkRole, defRole, damageType, baseFactor, i
|
|||
-- 基础伤害增加系数
|
||||
local addDamageFactor = 1 + atkRole:GetRoleData(RoleDataName.DamageBocusFactor) - defRole:GetRoleData(RoleDataName.DamageReduceFactor)
|
||||
|
||||
-- 是否暴击: 暴击率 = 自身暴击率 - 对方抗暴率
|
||||
local bCrit = false
|
||||
local critRandom = Random.Range01()
|
||||
--特殊处理 白骨精附加的普攻不会必定暴击
|
||||
local mustCrit=atkRole.mustCrit
|
||||
if atkRole.roleId==10091 and skill and skill.type==BattleSkillType.Normal and skill.isAdd then
|
||||
mustCrit=false
|
||||
end
|
||||
local critCondition = clamp(atkRole:GetRoleData(RoleDataName.Crit) - defRole:GetRoleData(RoleDataName.Tenacity), 0, 1)
|
||||
bCrit = critRandom <= critCondition
|
||||
bCrit =mustCrit or bCrit or defRole.isFlagCrit == true -- 必定暴击
|
||||
|
||||
|
||||
-- 计算暴伤害系数
|
||||
local critDamageFactor = 1
|
||||
local critDamageReduceFactor = 0 -- 暴击伤害减免
|
||||
|
@ -970,16 +979,29 @@ function BattleUtil.CalDamage(skill, atkRole, defRole, damageType, baseFactor, i
|
|||
defRole.Event:DispatchEvent(BattleEventName.CritDamageReduceFactor, onCritDamageReduceFactor, atkRole, defRole)
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.CritDamageReduceFactor, onCritDamageReduceFactor, atkRole, defRole)
|
||||
critDamageReduceFactor = max(BattleUtil.CountChangeList(critDamageReduceFactor, cl), 0)
|
||||
|
||||
-- 计算额外暴击伤害
|
||||
critDamageFactor = 1.3 + atkRole:GetRoleData(RoleDataName.CritDamageFactor) - critDamageReduceFactor
|
||||
|
||||
local critDamageAddFactor=0
|
||||
--加入被动效果 触发暴击被动
|
||||
local critFunc = function(critEx) critDamageFactor = critEx end
|
||||
atkRole.Event:DispatchEvent(BattleEventName.PassiveCriting, critFunc,skill)
|
||||
local cl2 = {}
|
||||
local onCritDamageAddFactor = function(v, ct)
|
||||
if v then
|
||||
table.insert(cl2, {v, ct})
|
||||
end
|
||||
end
|
||||
atkRole.Event:DispatchEvent(BattleEventName.PassiveAddCritDamageFactor, onCritDamageAddFactor, atkRole, defRole)
|
||||
critDamageAddFactor = max(BattleUtil.CountChangeList(critDamageAddFactor, cl2), 0)
|
||||
-- 计算额外暴击伤害
|
||||
critDamageFactor = 1.3 + atkRole:GetRoleData(RoleDataName.CritDamageBonus) - defRole:GetRoleData(RoleDataName.CritDamageReduce)+critDamageAddFactor - critDamageReduceFactor
|
||||
--加入被动效果 触发暴击被动 废弃不用
|
||||
-- local critFunc = function(critEx) critDamageFactor = critEx end
|
||||
-- atkRole.Event:DispatchEvent(BattleEventName.PassiveCriting, critFunc,skill)
|
||||
end
|
||||
|
||||
-- 公式伤害 = 基础伤害 * 基础伤害系数 * 增伤系数 * 爆伤系数
|
||||
local fixDamage = floor(BattleUtil.FP_Mul(baseDamage, baseFactor, addDamageFactor, critDamageFactor))
|
||||
-- 计算克制伤害系数
|
||||
local MieKangFactor = 1 + atkRole:GetRoleData(BattleMieProp[defRole.element]) - defRole:GetRoleData(BattleKangProp[atkRole.element])
|
||||
|
||||
-- 公式伤害 = 基础伤害 * 基础伤害系数 * 增伤系数 * 爆伤系数 * 克制伤害系数
|
||||
local fixDamage = floor(BattleUtil.FP_Mul(baseDamage, baseFactor, addDamageFactor, critDamageFactor, MieKangFactor))
|
||||
|
||||
-- 公式计算完成
|
||||
local damageFunc = function(damage) fixDamage = damage end
|
||||
|
@ -1019,7 +1041,7 @@ function BattleUtil.CalTreat(castRole, targetRole, value, baseFactor,skill)
|
|||
--计算暴击
|
||||
if bCrit then
|
||||
--伤害有个+1.3 不知道干什么用的就给去了 by:wangxhenxing 2020/10/10 18:46
|
||||
critDamageFactor = 1.3 + castRole:GetRoleData(RoleDataName.CritDamageFactor)
|
||||
critDamageFactor = 1.3 + castRole:GetRoleData(RoleDataName.CritDamageBonus)
|
||||
end
|
||||
-- 基础伤害增加系数
|
||||
local addDamageFactor = 1 + castRole:GetRoleData(RoleDataName.DamageBocusFactor)
|
||||
|
@ -1054,8 +1076,8 @@ function BattleUtil.FinalTreat(castRole, targetRole, value, baseFactor,skill)
|
|||
targetRole.data:AddValue(RoleDataName.Hp, treat)
|
||||
end
|
||||
|
||||
castRole.Event:DispatchEvent(BattleEventName.RoleTreat, targetRole, treat, baseTreat)
|
||||
targetRole.Event:DispatchEvent(BattleEventName.RoleBeTreated, castRole, treat, baseTreat)
|
||||
castRole.Event:DispatchEvent(BattleEventName.RoleTreat, targetRole, treat, baseTreat,skill)
|
||||
targetRole.Event:DispatchEvent(BattleEventName.RoleBeTreated, castRole, treat, baseTreat,skill)
|
||||
--添加发送到battleLogic的治疗消息,用于计算总的战斗伤害值
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.RoleBeTreated, castRole, treat, baseTreat)
|
||||
-- 战斗记录用
|
||||
|
@ -1119,8 +1141,8 @@ function BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamag
|
|||
if treat > 0 then
|
||||
targetRole.data:AddValue(RoleDataName.Hp, treat)
|
||||
end
|
||||
castRole.Event:DispatchEvent(BattleEventName.RoleTreat, targetRole, treat, baseTreat)
|
||||
targetRole.Event:DispatchEvent(BattleEventName.RoleBeTreated, castRole, treat, baseTreat)
|
||||
castRole.Event:DispatchEvent(BattleEventName.RoleTreat, targetRole, treat, baseTreat,skill)
|
||||
targetRole.Event:DispatchEvent(BattleEventName.RoleBeTreated, castRole, treat, baseTreat,skill)
|
||||
--添加发送到battleLogic的治疗消息,用于计算总的战斗伤害值
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.RoleBeTreated, castRole, treat, baseTreat)
|
||||
-- 战斗记录用
|
||||
|
@ -1153,6 +1175,19 @@ function BattleUtil.CheckIsHit(atkRole, defRole,skill)
|
|||
end
|
||||
|
||||
|
||||
function BattleUtil.AddBlood(target,value)
|
||||
if not target.isBanBlood then
|
||||
if target.bloodShield then
|
||||
target.bloodShield:AddValue(value)
|
||||
else
|
||||
target:AddBuff(Buff.Create(target, BuffName.Blood,0,value))
|
||||
end
|
||||
else
|
||||
target.Event:DispatchEvent(BattleEventName.ShowHintText, BattleArtFontType.Blood)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--获取table的长度
|
||||
function BattleUtil.LengthOfTable(table)
|
||||
if not table then
|
||||
|
@ -1174,7 +1209,7 @@ function BattleUtil.RandomAction(rand, action)
|
|||
end
|
||||
|
||||
--
|
||||
function BattleUtil.RandomControl(rand, ctrl, caster, target, round)
|
||||
function BattleUtil.RandomControl(rand, ctrl, caster, target, round,skill)
|
||||
|
||||
local cl = {}
|
||||
local function _CallBack(v, ct)
|
||||
|
@ -1193,6 +1228,7 @@ function BattleUtil.RandomControl(rand, ctrl, caster, target, round)
|
|||
buff.target=target
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.RoleAddBuffFail,buff)
|
||||
end
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.RoleAddCtrlBuff,buff,isAdd,caster,target,skill)
|
||||
return isAdd
|
||||
end
|
||||
|
||||
|
@ -1361,7 +1397,7 @@ function BattleUtil.CheckSeckill(bf, kf, caster, target)
|
|||
table.insert(kcl, {kv, kct})
|
||||
end
|
||||
end
|
||||
caster.Event:DispatchEvent(BattleEventName.PassiveSeckill, _CallBack)
|
||||
caster.Event:DispatchEvent(BattleEventName.PassiveSeckill, _CallBack,target)
|
||||
target.Event:DispatchEvent(BattleEventName.PassiveBeSeckill, _CallBack)
|
||||
bf = BattleUtil.CountChangeList(bf, bcl)
|
||||
kf = BattleUtil.CountChangeList(kf, kcl)
|
||||
|
|
|
@ -83,6 +83,7 @@ function RoleLogic:Init(uid, data, position)
|
|||
self.IsCanAddSkill = true -- 是否可以追加技能
|
||||
self.mustHit=false --必定命中
|
||||
self.mustCrit=false --必定暴击
|
||||
self.isBanBlood=false --是否禁止上御甲
|
||||
self.isImmuneAllReduceShield = false --免疫敌方无敌盾(敌方无敌盾对自己无效)
|
||||
self.ignoreShara = false --忽略敌方分摊
|
||||
self.type = BattleUnitType.Role
|
||||
|
@ -345,17 +346,27 @@ function RoleLogic:AddBuff(buff)
|
|||
"missF", missF)
|
||||
-- 如果概率为0 或者没有miss
|
||||
if missF == 0 or not BattleUtil.RandomAction(missF, function() BattleLogic.BuffMgr:PutBuff(buff) end) then
|
||||
for i=1, self.buffFilter.size do
|
||||
if self.buffFilter.buffer[i](buff,self) then
|
||||
BattleLogManager.Log(
|
||||
"Buff Filter",
|
||||
"camp", buff.caster.camp,
|
||||
"position", buff.caster.position,
|
||||
"id", buff.id,
|
||||
"type", buff.type)
|
||||
BattleLogic.BuffMgr:PutBuff(buff)
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.RoleAddBuffFail,buff,self)
|
||||
return
|
||||
|
||||
--概率忽略免疫
|
||||
local ignoreProb=0
|
||||
local changeIgnore=function(v1,ct)
|
||||
ignoreProb=BattleUtil.CountValue(ignoreProb,v1,ct)
|
||||
end
|
||||
buff.caster.Event:DispatchEvent(BattleEventName.PassiveChangeIgnoreImmuneValue,changeIgnore,buff)
|
||||
local isIgnor=BattleUtil.RandomAction(ignoreProb,function()end)
|
||||
if not isIgnor then
|
||||
for i=1, self.buffFilter.size do
|
||||
if self.buffFilter.buffer[i](buff,self) then
|
||||
BattleLogManager.Log(
|
||||
"Buff Filter",
|
||||
"camp", buff.caster.camp,
|
||||
"position", buff.caster.position,
|
||||
"id", buff.id,
|
||||
"type", buff.type)
|
||||
BattleLogic.BuffMgr:PutBuff(buff)
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.RoleAddBuffFail,buff,self)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
BattleLogic.BuffMgr:AddBuff(self, buff)
|
||||
|
|
|
@ -70,6 +70,7 @@ function Skill:Cast(func)
|
|||
local targets=BattleUtil.LengthOfTable(self:GetDirectTargetsNoExile())
|
||||
if targets==0 and self.castDoneFunc then
|
||||
self.isRage=false
|
||||
self.owner.Event:DispatchEvent(BattleEventName.CastRageBrfore, self)
|
||||
self.castDoneFunc()
|
||||
return
|
||||
end
|
||||
|
|
|
@ -640,7 +640,7 @@ function this.BattleOrderChange(order)
|
|||
enemyPos.localScale = Vector3.zero
|
||||
enemyLivePos.localScale = Vector3.zero
|
||||
|
||||
local myPos = Util.GetTransform(this.PlayerPanel, "View/"..i.."/root")
|
||||
local myPos = Util.GetTransform(this.PlayerPanel,i.."/root")
|
||||
myPos:GetComponent("Image").sprite = this.spLoader:LoadSprite("bd_xinkapaifan")
|
||||
myPos.localScale = Vector3.one
|
||||
end
|
||||
|
@ -650,7 +650,7 @@ end
|
|||
function this.OnAddRole(data)
|
||||
local go
|
||||
if data.camp == 0 then
|
||||
local parent = Util.GetTransform(this.PlayerPanel, "View/"..data.position.."/root")
|
||||
local parent = Util.GetTransform(this.PlayerPanel,data.position.."/root")
|
||||
go = BattlePool.GetItem(parent, BATTLE_POOL_TYPE.MY_ROLE)
|
||||
playerHP = playerHP + data:GetRoleData(RoleDataName.Hp)
|
||||
playerMaxHP = playerMaxHP + data:GetRoleData(RoleDataName.MaxHp)
|
||||
|
|
|
@ -11,6 +11,7 @@ local BuffTypeToConfigType = {
|
|||
[BuffName.KylinMark] = 8,
|
||||
[BuffName.Exile] = 9,
|
||||
[BuffName.Blood] = 10,
|
||||
[BuffName.BanBlood] = 11,
|
||||
}
|
||||
local function _GetPropChangeBuffCType(pName)
|
||||
for cType, pn in ipairs(BattlePropList) do
|
||||
|
@ -49,6 +50,8 @@ local function _GetBuffEffectConfig(buff)
|
|||
cType = 1
|
||||
elseif bType== BuffName.Blood then
|
||||
cType = 1
|
||||
elseif bType==BuffName.BanBlood then
|
||||
cType = 1
|
||||
end
|
||||
|
||||
local type = BuffTypeToConfigType[bType]
|
||||
|
|
|
@ -289,7 +289,8 @@ function EnemyView:DoScale(scale, dur, func)
|
|||
if self.dsTween2 then
|
||||
self.dsTween2:Kill()
|
||||
end
|
||||
local liveScale = self.role.position <= 3 and 0.6 or 0.5
|
||||
--local liveScale = self.role.position <= 3 and 0.6 or 0.5
|
||||
local liveScale=0.6
|
||||
self.dsTween2 = self.RoleLiveGO.transform.parent:DOScale(Vector3.one * liveScale * scale, dur)
|
||||
|
||||
end
|
||||
|
|
|
@ -25,16 +25,16 @@ function PlayerView:onCreate(go, role, position, root)
|
|||
self.camp = role.camp
|
||||
|
||||
self.spLoader = SpriteLoader.New()
|
||||
|
||||
|
||||
|
||||
self.castingEfectNode = self.RootPanel.mySkillCast
|
||||
self.castingNameNode = Util.GetGameObject(self.castingEfectNode, "TongYong_Casting_Xia/DongHua/MingZi")
|
||||
self.hpSlider = Util.GetGameObject(go, "hpProgress/hp"):GetComponent("Image")
|
||||
self.hpPassSlider = Util.GetGameObject(go, "hpProgress/hpPass"):GetComponent("Image")
|
||||
self.yujiaSlider=Util.GetGameObject(go, "hpProgress/yujia"):GetComponent("Image")
|
||||
self.hpSlider = Util.GetGameObject(go, "lvObj/hpProgress/hp"):GetComponent("Image")
|
||||
self.hpPassSlider = Util.GetGameObject(go, "lvObj/hpProgress/hpPass"):GetComponent("Image")
|
||||
self.yujiaSlider=Util.GetGameObject(go, "lvObj/hpProgress/yujia"):GetComponent("Image")
|
||||
local nameParent = Util.GetGameObject(go, "Name")
|
||||
self.nameText = Util.GetGameObject(go, "Text"):GetComponent("Text")
|
||||
self.level = Util.GetGameObject(go, "lv/Text"):GetComponent("Text")
|
||||
self.level = Util.GetGameObject(go, "lvObj/lv/Text"):GetComponent("Text")
|
||||
self.elementImg = Util.GetGameObject(go, "Pro/Image"):GetComponent("Image")
|
||||
self.bg1 = Util.GetGameObject(go, "Bg1"):GetComponent("Image")
|
||||
self.bg2 = Util.GetGameObject(go, "Bg2"):GetComponent("Image")
|
||||
|
@ -86,27 +86,37 @@ function PlayerView:onCreate(go, role, position, root)
|
|||
SetCardStars(self.starGrid, star, starType)
|
||||
local zs = Util.GetGameObject(go, "zs")
|
||||
local zsName = GetHeroCardStarZs[role.roleData.star]
|
||||
if zsName == "" then
|
||||
zs:SetActive(false)
|
||||
else
|
||||
zs:SetActive(true)
|
||||
zs:GetComponent("Image").sprite = self.spLoader:LoadSprite(zsName)
|
||||
end
|
||||
|
||||
-- 卡牌立绘显示
|
||||
self.liveRender = Util.GetGameObject(go, "Mask/icon"):GetComponent("RawImage")
|
||||
self.liveRender.texture, self.RoleLiveGO , _, self.RoleLiveParnet = CardRendererManager.GetSpineTexture(role.position, self.livePath, Vector3.one * self.play_liveScale, Vector3.New(self.offset[1], self.offset[2], 0), false) --self.spLoader:LoadSprite(heroData.painting)
|
||||
self.liveRender.material = resMgr:LoadAsset("UI_AlphaMask "..position)
|
||||
self.liveRender.transform:SetParent(Util.GetGameObject(go, "Mask").transform)
|
||||
self.liveRender.transform.localScale = Vector3.one --* self.play_liveScale * 2
|
||||
self.liveRender.transform.anchoredPosition = Vector3.zero--Vector2.New(self.offset[1], self.offset[2])
|
||||
self.liveRender.gameObject:SetActive(true)
|
||||
self.liveRender.material:SetInt("_IsMask", 1)
|
||||
|
||||
-- if zsName == "" then
|
||||
-- zs:SetActive(false)
|
||||
-- else
|
||||
-- zs:SetActive(true)
|
||||
-- zs:GetComponent("Image").sprite = self.spLoader:LoadSprite(zsName)
|
||||
-- end
|
||||
|
||||
self.RoleLiveGO = poolManager:LoadLive(self.livePath, go.transform.parent, Vector3.one, Vector3.zero)
|
||||
self.RoleLiveGOGraphic = self.RoleLiveGO:GetComponent("SkeletonGraphic")
|
||||
self.RoleLiveGOTran = self.RoleLiveGO:GetComponent("RectTransform")
|
||||
self.RoleLiveGOGraphic.AnimationState:SetAnimation(0, "idle", true)
|
||||
self.RoleLiveGOTran.sizeDelta = Vector2.New(1000, 1000)
|
||||
--self.RootPanel.PlayerPanel, "live_"..position
|
||||
self.RoleLiveGO.transform:SetParent(Util.GetTransform(self.RootPanel.PlayerPanel, "live_"..position))
|
||||
self.RoleLiveGO:GetComponent("RectTransform").anchoredPosition = Vector2.New(self.outOffset[1], self.outOffset[2])-- * 0.5
|
||||
self.RoleLiveGO.transform.localScale = Vector3.one * self.enemy_liveScale
|
||||
self.RoleLiveGO:SetActive(true)
|
||||
|
||||
|
||||
-- 卡牌立绘显示
|
||||
--self.liveRender = Util.GetGameObject(go, "Mask/icon"):GetComponent("RawImage")
|
||||
--self.liveRender.texture, self.aaa , _, self.RoleLiveParnet = CardRendererManager.GetSpineTexture(role.position, self.livePath, Vector3.one * self.play_liveScale, Vector3.New(self.offset[1], self.offset[2], 0), false) --self.spLoader:LoadSprite(heroData.painting)
|
||||
--self.liveRender.gameObject:SetActive(false)
|
||||
-- self.liveRender.material = resMgr:LoadAsset("UI_AlphaMask "..position)
|
||||
-- self.liveRender.transform:SetParent(Util.GetGameObject(go, "Mask").transform)
|
||||
-- self.liveRender.transform.localScale = Vector3.one --* self.play_liveScale * 2
|
||||
-- self.liveRender.transform.anchoredPosition = Vector3.zero--Vector2.New(self.offset[1], self.offset[2])
|
||||
-- self.liveRender.gameObject:SetActive(true)
|
||||
-- self.liveRender.material:SetInt("_IsMask", 1)
|
||||
|
||||
|
||||
|
||||
-- casting技能立绘
|
||||
self.RoleLiveGO2 = poolManager:LoadLive(self.livePath, go.transform.parent, Vector3.one, Vector3.zero)
|
||||
|
@ -132,14 +142,19 @@ function PlayerView:onCreate(go, role, position, root)
|
|||
|
||||
-- 怒气显示
|
||||
self.rageCache = nil
|
||||
self.rageSlider = Util.GetGameObject(go, "rageProgress/rage"):GetComponent("Image")
|
||||
self.rageText = Util.GetGameObject(go, "rageProgress/Text"):GetComponent("Text")
|
||||
self.effect_rage = Util.GetGameObject(go, "rageProgress/effect")
|
||||
self.rageSlider = Util.GetGameObject(go, "lvObj/rageProgress/rage"):GetComponent("Image")
|
||||
self.rageText = Util.GetGameObject(go, "lvObj/rageProgress/Text"):GetComponent("Text")
|
||||
self.effect_rage = Util.GetGameObject(go, "lvObj/rageProgress/effect")
|
||||
self.effect_rage:SetActive(self.role.Rage >= 4)
|
||||
self.rageSlider.fillAmount = self.role.Rage / 4
|
||||
self.rageText.gameObject:SetActive(false)
|
||||
self.rageText.text = ""
|
||||
|
||||
self.lvHpObj=Util.GetGameObject(go, "lvObj")
|
||||
if position<=3 then
|
||||
self.lvHpObj:GetComponent("RectTransform").anchoredPosition=Vector3.New(0,485,0)
|
||||
else
|
||||
self.lvHpObj:GetComponent("RectTransform").anchoredPosition=Vector3.New(0,0,0)
|
||||
end
|
||||
-- 伤害文字显示
|
||||
self.LastBuffFloatingTime = Time.realtimeSinceStartup
|
||||
self.BuffFloatingCount = 0
|
||||
|
@ -295,17 +310,26 @@ function PlayerView:DoScale(scale, dur, func)
|
|||
func()
|
||||
end
|
||||
end)
|
||||
if self.dsTween2 then
|
||||
self.dsTween2:Kill()
|
||||
end
|
||||
--local liveScale = self.role.position <= 3 and 0.6 or 0.5
|
||||
local liveScale = 0.6
|
||||
self.dsTween2 = self.RoleLiveGO.transform.parent:DOScale(Vector3.one * liveScale * scale, dur)
|
||||
end
|
||||
|
||||
--角色被放逐
|
||||
function PlayerView:OnRoleExile(role)
|
||||
local color = Color.New(1, 1, 1, 0.4)
|
||||
Util.SetColor(self.liveRender, color)
|
||||
local color1 = Color.New(1, 1, 1, 0.4)
|
||||
|
||||
--Util.SetColor(self.liveRender, color)
|
||||
Util.SetColor(self.RoleLiveGOGraphic, color1)
|
||||
end
|
||||
--角色放逐结束
|
||||
function PlayerView:OnRoleExileEnd(role)
|
||||
local color = Color.New(1, 1, 1, 1)
|
||||
Util.SetColor(self.liveRender, color)
|
||||
local color2 = Color.New(1, 1, 1, 1)
|
||||
--Util.SetColor(self.liveRender, color)
|
||||
Util.SetColor(self.RoleLiveGOGraphic, color2)
|
||||
end
|
||||
-- 设置高亮
|
||||
function PlayerView:SetHighLight(isLight, eScale, dur, func)
|
||||
|
@ -332,7 +356,11 @@ function PlayerView:SetHighLight(isLight, eScale, dur, func)
|
|||
end
|
||||
self.hlTween3 = DoTween.To(DG.Tweening.Core.DOGetter_float( function () return sc end),
|
||||
DG.Tweening.Core.DOSetter_float(function (progress)
|
||||
local color = Color.New(progress, progress, progress, 1)
|
||||
local aaa=1
|
||||
if self.role.isExile then
|
||||
aaa=0.4
|
||||
end
|
||||
local color = Color.New(progress, progress, progress,aaa)
|
||||
Util.SetColor(self.GameObject, color)
|
||||
Util.SetColor(self.RoleLiveGOGraphic, color)
|
||||
end), ec, dur):SetEase(Ease.Linear)
|
||||
|
@ -366,24 +394,26 @@ end
|
|||
|
||||
function PlayerView:OnSkillPlay()
|
||||
if not self.GameObject then
|
||||
LogError("111111111")
|
||||
return
|
||||
end
|
||||
local battleSorting = BattleManager.GetBattleSorting()
|
||||
self:ChangeCardSorting(battleSorting + 20)
|
||||
self.lvHpObj:SetActive(false)
|
||||
--local battleSorting = BattleManager.GetBattleSorting()
|
||||
-- self:ChangeCardSorting(battleSorting + 20)
|
||||
-- 立绘缩小
|
||||
if self.rlgTween2 then self.rlgTween2:Kill() end
|
||||
self.rlgTween2 = self.RoleLiveParnet.transform:DOScale(Vector3.one * 0.85, 0.3):SetEase(Ease.OutSine)
|
||||
-- 立绘位置剧中
|
||||
if self.rlgTween3 then self.rlgTween3:Kill() end
|
||||
self.rlgTween3 = self.RoleLiveParnet.transform:DOLocalMove(Vector3.New(0, 100, 0), 0.3, false):SetEase(Ease.OutSine)
|
||||
if self.liveRender then
|
||||
local mask2 = Util.GetGameObject(self.GameObject, "Mask2")
|
||||
if mask2 then
|
||||
self.liveRender.transform:SetParent(mask2.transform)
|
||||
end
|
||||
end
|
||||
local cardRenderMat = self.liveRender.material
|
||||
cardRenderMat:SetInt("_IsMask", 0)
|
||||
-- if self.rlgTween2 then self.rlgTween2:Kill() end
|
||||
-- self.rlgTween2 = self.RoleLiveParnet.transform:DOScale(Vector3.one * 0.85, 0.3):SetEase(Ease.OutSine)
|
||||
-- -- 立绘位置剧中
|
||||
-- if self.rlgTween3 then self.rlgTween3:Kill() end
|
||||
-- self.rlgTween3 = self.RoleLiveParnet.transform:DOLocalMove(Vector3.New(0, 100, 0), 0.3, false):SetEase(Ease.OutSine)
|
||||
-- if self.liveRender then
|
||||
-- local mask2 = Util.GetGameObject(self.GameObject, "Mask2")
|
||||
-- if mask2 then
|
||||
-- self.liveRender.transform:SetParent(mask2.transform)
|
||||
-- end
|
||||
-- end
|
||||
-- local cardRenderMat = self.liveRender.material
|
||||
-- cardRenderMat:SetInt("_IsMask", 0)
|
||||
self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, "attack", false)
|
||||
end
|
||||
|
||||
|
@ -393,20 +423,22 @@ function PlayerView:OnSkillEnd()
|
|||
end
|
||||
local battleSorting = BattleManager.GetBattleSorting()
|
||||
self:ChangeCardSorting(battleSorting + self.role.position)
|
||||
self.liveRender.transform:SetParent(Util.GetGameObject(self.GameObject, "Mask").transform)
|
||||
local cardRenderMat = self.liveRender.material
|
||||
cardRenderMat:SetInt("_IsMask", 1)
|
||||
-- self.liveRender.transform:SetParent(Util.GetGameObject(self.GameObject, "Mask").transform)
|
||||
--local cardRenderMat = self.liveRender.material
|
||||
--cardRenderMat:SetInt("_IsMask", 1)
|
||||
-- 动画播放就停止
|
||||
if self.rlgTween2 then self.rlgTween2:Kill() end
|
||||
if self.rlgTween3 then self.rlgTween3:Kill() end
|
||||
self.RoleLiveParnet.transform.localScale = Vector3.one --Vector2.New(self.offset[1], self.offset[2])
|
||||
self.RoleLiveParnet.transform.localPosition = Vector3(0, 0, 0)
|
||||
self.liveRender.transform.anchoredPosition = Vector2.zero--Vector2.New(self.offset[1], self.offset[2])
|
||||
--self.RoleLiveParnet.transform.localScale = Vector3.one --Vector2.New(self.offset[1], self.offset[2])
|
||||
--self.RoleLiveParnet.transform.localPosition = Vector3(0, 0, 0)
|
||||
--self.liveRender.transform.anchoredPosition = Vector2.zero--Vector2.New(self.offset[1], self.offset[2])
|
||||
self.lvHpObj:SetActive(true)
|
||||
end
|
||||
|
||||
function PlayerView:OnSkillCastingStart()
|
||||
-- 提前进入下一阶段
|
||||
self.RoleLiveGO2:SetActive(true)
|
||||
self.lvHpObj:SetActive(false)
|
||||
self:PlaySpineAnim(self.RoleLiveGOGraphic2, 0, "touch", false)
|
||||
end
|
||||
|
||||
|
@ -613,6 +645,8 @@ function PlayerView:OnDead()
|
|||
self.hpSlider.fillAmount = 0
|
||||
self.hpPassSlider.fillAmount = 0
|
||||
self.yujiaSlider.fillAmount = 0
|
||||
--self.RoleLiveGO.gameObject:SetActive(false)
|
||||
self.lvHpObj:SetActive(false)
|
||||
--死亡后不把怒气条显示清空,处理触发不灭怒气不足四点 怒气条清空 2021/09/01
|
||||
--self.rageSlider.fillAmount = 0
|
||||
self.rageText.text = ""
|
||||
|
@ -627,6 +661,21 @@ function PlayerView:OnRealDead()
|
|||
Util.SetGray(self.RoleIconGO, true)
|
||||
self.effect_dead:SetActive(true)
|
||||
self.effect_rage:SetActive(false)
|
||||
local order = BattleLogic.CurOrder
|
||||
BattleManager.PauseBattle()
|
||||
self.RoleLiveGOGraphic:DOFade(1, 0):OnComplete(function ()
|
||||
self.RoleLiveGOGraphic:DOFade(0, 1):OnComplete(function ()
|
||||
BattleManager.ResumeBattle()
|
||||
self.RoleLiveGOGraphic.color = Color.New(1,1,1,1)
|
||||
if order ~= BattleLogic.CurOrder then return end
|
||||
self.GameObject:SetActive(false)
|
||||
self.RoleLiveGO:SetActive(false)
|
||||
self.effect_dead:SetActive(false)
|
||||
if self.shadow then
|
||||
self.shadow:SetActive(false)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
self.deadIconGO:SetActive(true)
|
||||
|
||||
local color = Color.New(75, 75, 75, 255)/255
|
||||
|
@ -673,6 +722,8 @@ function PlayerView:onRoleRelive()
|
|||
BattleManager.AddDelayRecycleRes(reliveEffect1, go, 3)
|
||||
BattleManager.AddDelayRecycleRes(reliveEffect2, go, 3)
|
||||
self.Floater:ImageBuffFloating("z_zhandou_fuhuo_zh")
|
||||
self.RoleLiveGO.gameObject:SetActive(true)
|
||||
self.lvHpObj:SetActive(true)
|
||||
|
||||
end
|
||||
|
||||
|
@ -692,6 +743,7 @@ function PlayerView:onDispose()
|
|||
self.RoleLiveGOGraphic.freeze = false
|
||||
self.RoleLiveGOGraphic2.freeze = false
|
||||
poolManager:UnLoadLive(self.livePath, self.RoleLiveGO2)
|
||||
poolManager:UnLoadLive(self.livePath, self.RoleLiveGO)
|
||||
-- 回收本节点
|
||||
BattlePool.RecycleItem(self.GameObject, BATTLE_POOL_TYPE.MY_ROLE)
|
||||
self.GameObject = nil
|
||||
|
|
|
@ -243,29 +243,21 @@ function this.CalculateEquipWarForce(curEquip)
|
|||
for index, prop in pairs(mainAttribute) do
|
||||
local id = prop.propertyId
|
||||
local value = prop.propertyValue
|
||||
--
|
||||
if propertyConfig[id].Style == 2 then
|
||||
value = value / 100
|
||||
end
|
||||
if addAllProVal[id] then
|
||||
addAllProVal[id] = addAllProVal[id] + value
|
||||
else
|
||||
addAllProVal[id] = value
|
||||
end
|
||||
end
|
||||
local powerEndVal = 0
|
||||
for i, v in pairs(addAllProVal) do
|
||||
if v > 0 then
|
||||
local curProConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, i)
|
||||
if curProConfigData then
|
||||
if curProConfigData.Style == 1 then
|
||||
powerEndVal = powerEndVal + v * HeroManager.heroPropertyScore[i]
|
||||
else
|
||||
powerEndVal = powerEndVal + v / 100 * HeroManager.heroPropertyScore[i]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if curEquip and curEquip.Score > 0 then
|
||||
powerEndVal = powerEndVal + curEquip.Score
|
||||
addAllProVal[HeroProType.WarPower] = curEquip.Score
|
||||
end
|
||||
return math.floor(powerEndVal)
|
||||
local powerEndVal = HeroPowerManager.CalPower(addAllProVal)
|
||||
return powerEndVal
|
||||
end
|
||||
|
||||
-- 判断是否是新装备
|
||||
|
|
|
@ -128,24 +128,8 @@ function this.CalculateWarForceBase(curTalismanConFigData,heroPos)
|
|||
end
|
||||
end
|
||||
end
|
||||
local heroPropertyScore={}
|
||||
for i, v in ConfigPairs(propertyConfig) do
|
||||
heroPropertyScore[i]=v.Score
|
||||
end
|
||||
local powerEndVal=0
|
||||
for i, v in pairs(addAllProVal) do
|
||||
if v > 0 then
|
||||
local curProConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig,i)
|
||||
if curProConfigData then
|
||||
if curProConfigData.Style == 1 then
|
||||
powerEndVal=powerEndVal+v*heroPropertyScore[i]
|
||||
else
|
||||
powerEndVal=powerEndVal+v/100*heroPropertyScore[i]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return math.floor(powerEndVal)
|
||||
local powerEndVal = HeroPowerManager.CalPower(addAllProVal)
|
||||
return powerEndVal
|
||||
end
|
||||
end
|
||||
function this.GetAllTalismanByCondition(curTalismanData,upStarConFigData)
|
||||
|
|
|
@ -2165,56 +2165,59 @@ end
|
|||
function this.CalculateWarAllProVal(heroDid)
|
||||
local allEquipAddProVal = HeroPropManager.GetHeroProp(heroDid)--HeroManager.CalculateHeroAllProValList(1, heroDid, true)
|
||||
local allProVal = {}
|
||||
table.insert(allProVal, 1, HeroManager.GetSingleHeroData(heroDid).lv)
|
||||
--等级
|
||||
table.insert(allProVal, 2, allEquipAddProVal[HeroProType.Hp])
|
||||
table.insert(allProVal, 1, HeroManager.GetSingleHeroData(heroDid).lv)
|
||||
--生命
|
||||
table.insert(allProVal, 3, allEquipAddProVal[HeroProType.Hp])
|
||||
table.insert(allProVal, 2, allEquipAddProVal[HeroProType.Hp])
|
||||
--最大生命
|
||||
table.insert(allProVal, 4, allEquipAddProVal[HeroProType.Attack])
|
||||
table.insert(allProVal, 3, allEquipAddProVal[HeroProType.Hp])
|
||||
--攻击力
|
||||
table.insert(allProVal, 5, allEquipAddProVal[HeroProType.PhysicalDefence])
|
||||
table.insert(allProVal, 4, allEquipAddProVal[HeroProType.Attack])
|
||||
--护甲
|
||||
table.insert(allProVal, 6, allEquipAddProVal[HeroProType.MagicDefence])
|
||||
table.insert(allProVal, 5, allEquipAddProVal[HeroProType.PhysicalDefence])
|
||||
--魔抗
|
||||
table.insert(allProVal, 7, allEquipAddProVal[HeroProType.Speed])
|
||||
table.insert(allProVal, 6, allEquipAddProVal[HeroProType.MagicDefence])
|
||||
--速度
|
||||
table.insert(allProVal, 8, allEquipAddProVal[HeroProType.DamageBocusFactor])
|
||||
table.insert(allProVal, 7, allEquipAddProVal[HeroProType.Speed])
|
||||
--伤害加成系数(%)
|
||||
table.insert(allProVal, 9, allEquipAddProVal[HeroProType.DamageReduceFactor])
|
||||
table.insert(allProVal, 8, allEquipAddProVal[HeroProType.DamageBocusFactor])
|
||||
--伤害减免系数(%)
|
||||
table.insert(allProVal, 10, allEquipAddProVal[HeroProType.Hit])
|
||||
table.insert(allProVal, 9, allEquipAddProVal[HeroProType.DamageReduceFactor])
|
||||
--命中率(%)
|
||||
table.insert(allProVal, 11, allEquipAddProVal[HeroProType.Dodge])
|
||||
table.insert(allProVal, 10, allEquipAddProVal[HeroProType.Hit])
|
||||
--闪避率(%)
|
||||
table.insert(allProVal, 12, allEquipAddProVal[HeroProType.CritFactor])
|
||||
table.insert(allProVal, 11, allEquipAddProVal[HeroProType.Dodge])
|
||||
--暴击率(%)
|
||||
table.insert(allProVal, 13, allEquipAddProVal[HeroProType.CritDamageFactor])
|
||||
table.insert(allProVal, 12, allEquipAddProVal[HeroProType.CritFactor])
|
||||
--暴击伤害系数(%)
|
||||
table.insert(allProVal, 14, allEquipAddProVal[HeroProType.AntiCritDamageFactor])
|
||||
table.insert(allProVal, 13, allEquipAddProVal[HeroProType.CritDamageFactor])
|
||||
--抗暴率(%)
|
||||
table.insert(allProVal, 15, allEquipAddProVal[HeroProType.TreatFacter])
|
||||
table.insert(allProVal, 14, allEquipAddProVal[HeroProType.AntiCritFactor])
|
||||
--治疗加成系数(%)
|
||||
table.insert(allProVal, 16, allEquipAddProVal[HeroProType.CureFacter])
|
||||
table.insert(allProVal, 15, allEquipAddProVal[HeroProType.TreatFacter])
|
||||
--受到治疗系数(%)
|
||||
table.insert(allProVal, 17, allEquipAddProVal[HeroProType.DifferDemonsBocusFactor])
|
||||
--异妖伤害加成系数(%)
|
||||
table.insert(allProVal, 18, allEquipAddProVal[HeroProType.DifferDemonsReduceFactor])
|
||||
--异妖减伤率(%)
|
||||
table.insert(allProVal, 19, allEquipAddProVal[HeroProType.FireDamageReduceFactor])
|
||||
--火系伤害减免系数(%)
|
||||
table.insert(allProVal, 20, allEquipAddProVal[HeroProType.WindDamageReduceFactor])
|
||||
--风系伤害减免系数(%)
|
||||
table.insert(allProVal, 21, allEquipAddProVal[HeroProType.WaterDamageReduceFactor])
|
||||
--冰系伤害减免系数(%)
|
||||
table.insert(allProVal, 22, allEquipAddProVal[HeroProType.LandDamageReduceFactor])
|
||||
--地系伤害减免系数(%)
|
||||
table.insert(allProVal, 23, allEquipAddProVal[HeroProType.LightDamageReduceFactor])
|
||||
--光系伤害减免系数(%)
|
||||
table.insert(allProVal, 24, allEquipAddProVal[HeroProType.DarkDamageReduceFactor])
|
||||
--暗系伤害减免系数(%)
|
||||
table.insert(allProVal, 25, 0)
|
||||
--属性伤害加成系数(%)
|
||||
table.insert(allProVal, 16, allEquipAddProVal[HeroProType.CureFacter])
|
||||
-- 人系伤害加成
|
||||
table.insert(allProVal, 17, allEquipAddProVal[HeroProType.RenBonus])
|
||||
-- 佛系伤害加成
|
||||
table.insert(allProVal, 18, allEquipAddProVal[HeroProType.FoBonus])
|
||||
-- 妖系伤害加成
|
||||
table.insert(allProVal, 19, allEquipAddProVal[HeroProType.YaoBonus])
|
||||
-- 道系伤害加成
|
||||
table.insert(allProVal, 20, allEquipAddProVal[HeroProType.DaoBonus])
|
||||
-- 人系伤害减免
|
||||
table.insert(allProVal, 21, allEquipAddProVal[HeroProType.RenReduce])
|
||||
-- 佛系伤害减免
|
||||
table.insert(allProVal, 22, allEquipAddProVal[HeroProType.FoReduce])
|
||||
-- 妖系伤害减免
|
||||
table.insert(allProVal, 23, allEquipAddProVal[HeroProType.YaoReduce])
|
||||
-- 道系伤害减免
|
||||
table.insert(allProVal, 24, allEquipAddProVal[HeroProType.DaoReduce])
|
||||
-- 爆伤减免
|
||||
table.insert(allProVal, 25, allEquipAddProVal[HeroProType.AntiCritDamageFactor])
|
||||
-- 怒气
|
||||
table.insert(allProVal, 26, allEquipAddProVal[HeroProType.InitRage])
|
||||
|
||||
return allProVal
|
||||
end
|
||||
|
||||
|
|
|
@ -29,20 +29,20 @@ local function CalculateWarForce2(powerVal)
|
|||
if v > 0 and i < HeroProType.WarPower then
|
||||
if propertyConfig[i].IfShow == 1 then
|
||||
if propertyConfig[i].TargetPropertyId == 0 then
|
||||
basePower = basePower + v * propertyConfig[i].Score
|
||||
basePower = basePower + v*propertyConfig[i].Score
|
||||
end
|
||||
elseif propertyConfig[i].IfShow == 2 then
|
||||
-- 这里百分比数要转换成小数,用于计算战斗力
|
||||
HighPower = HighPower + v/100
|
||||
HighPower = HighPower + v/100*propertyConfig[i].Score
|
||||
end
|
||||
elseif v > 0 and i >= HeroProType.WarPower then
|
||||
elseif v > 0 and i == HeroProType.WarPower then
|
||||
extPower = extPower + v
|
||||
end
|
||||
end
|
||||
LogBlue_Prop("basePower: "..basePower)
|
||||
LogBlue_Prop("HighPower: "..HighPower)
|
||||
LogBlue_Prop("extPower: "..extPower)
|
||||
powerEndVal = basePower * (1 + HighPower / 2) + extPower
|
||||
powerEndVal = basePower * (1 + HighPower) + extPower
|
||||
return math.floor(powerEndVal)
|
||||
end
|
||||
|
||||
|
@ -89,8 +89,7 @@ function this.InitAllPower()
|
|||
end
|
||||
|
||||
|
||||
function this.CalPower(heroData, propList)
|
||||
-- return CalculateWarForce(propList)
|
||||
function this.CalPower(propList)
|
||||
return CalculateWarForce2(propList)
|
||||
end
|
||||
|
||||
|
@ -108,7 +107,7 @@ function this.GetHeroPower(dId, formationId, NoFuncProp)
|
|||
-- 重新计算人物属性
|
||||
local propList = HeroPropManager.GetHeroProp(dId, formationId, NoFuncProp)
|
||||
-- 计算战斗力
|
||||
local allPower = this.CalPower(heroData, propList)
|
||||
local allPower = this.CalPower(propList)
|
||||
-- 旧战斗力
|
||||
if HeroPropManager.IsDebug() and not NoFuncProp then
|
||||
-- local curHeroData = HeroManager.GetSingleHeroData(dId)
|
||||
|
|
|
@ -133,10 +133,10 @@ function RewardEquipSingleShowPopup2:BindEvent()
|
|||
local equipIdList={}
|
||||
local equipDataList={}
|
||||
table.insert(equipIdList,tostring(self.equipData.id))
|
||||
table.insert(equipDataList,self.nextEquip)
|
||||
table.insert(equipDataList,self.equipData)
|
||||
NetManager.EquipWearRequest(self.curHeroData.dynamicId,equipIdList ,1, function ()
|
||||
self:ClosePanel()
|
||||
self.parent.UpdateEquipPosHeroData(1,typeToUpdate[self.openType],equipDataList,self.equipData,self.position)
|
||||
self.parent.UpdateEquipPosHeroData(1,typeToUpdate[self.openType],equipDataList,self.nextEquip,self.position)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
@ -173,7 +173,7 @@ end
|
|||
|
||||
function RewardEquipSingleShowPopup2:SetBtns()
|
||||
local itemConfigData=ConfigManager.GetConfigData(ConfigName.ItemConfig, tonumber(self.equipData.id))
|
||||
self.btnSure:SetActive(itemConfigData.IfResolve==1)
|
||||
self.btnSure:SetActive(itemConfigData.IfResolve==1 and BagManager.isBagPanel)
|
||||
self.btnJump:SetActive(itemConfigData.UseJump and itemConfigData.UseJump > 0 and BagManager.isBagPanel)
|
||||
self.btnWear:SetActive(self.openType == 3)
|
||||
self.btnDown:SetActive(self.openType == 2)
|
||||
|
@ -202,7 +202,7 @@ function RewardEquipSingleShowPopup2:OnShow()
|
|||
self.powerNumUpDown.gameObject:SetActive(true)
|
||||
local Power = EquipManager.CalculateWarForce(self.equipData.id)
|
||||
local Power2 = EquipManager.CalculateWarForce(self.nextEquip.id)
|
||||
LogGreen("Id:"..tostring(self.equipData.id).."Power:"..tostring(Power).." Id2:"..tostring(self.equipData.id).."Power2:"..tostring(Power2))
|
||||
-- LogGreen("Id:"..tostring(self.equipData.id).." Power:"..tostring(Power).." Id2:"..tostring(self.equipData.id).." Power2:"..tostring(Power2))
|
||||
if(Power > Power2) then
|
||||
self.powerNumUpDown.sprite = self.spLoader:LoadSprite(PowerChangeIconDef[1])
|
||||
elseif(Power < Power2)then
|
||||
|
@ -217,6 +217,9 @@ function RewardEquipSingleShowPopup2:OnShow()
|
|||
--basePro基础属性
|
||||
if equipConfigData.Property then
|
||||
self.basePro:SetActive(true)
|
||||
for _, pro in ipairs(_BaseProList) do
|
||||
pro:SetActive(false)
|
||||
end
|
||||
for index, prop in ipairs(equipConfigData.Property) do
|
||||
local proConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, prop[1])
|
||||
if proConfigData then
|
||||
|
|
|
@ -150,6 +150,25 @@ function RewardItemSingleShowPopup:BindEvent()
|
|||
self:ClosePanel()
|
||||
end)
|
||||
end,Language[10731],Language[10732],Language[11511],false,"")
|
||||
elseif itemConfigData.ItemType == ItemType.ZuoQiChip then
|
||||
local sum = BagManager.GetItemCountById(itemSid) / BagManager.bagDatas[itemSid].itemConfig.UsePerCount
|
||||
sum = math.floor(sum)
|
||||
if sum >= 2 then
|
||||
local _itemData = BagManager.bagDatas[itemSid]
|
||||
UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function()
|
||||
func()
|
||||
end)
|
||||
elseif sum >= 1 then
|
||||
local _itemData = BagManager.bagDatas[itemSid]
|
||||
local item={}
|
||||
item.itemId= _itemData.id
|
||||
item.itemNum= sum * _itemData.itemConfig.UsePerCount
|
||||
NetManager.HeroComposeRequest(item,function (drop)
|
||||
this.SendBackCompoundReCallBack(drop)
|
||||
end)
|
||||
else
|
||||
PopupTipPanel.ShowTip(Language[11509])
|
||||
end
|
||||
else
|
||||
local _itemData = BagManager.bagDatas[itemSid]
|
||||
UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function()
|
||||
|
@ -312,7 +331,10 @@ function RewardItemSingleShowPopup:OnShow()
|
|||
elseif isBagPanel and itemConfigData.IfResolve == 1 and func then--是否可分解
|
||||
this.btnSure:SetActive(true)
|
||||
this.btnSureText.text = Language[10197]
|
||||
elseif isBagPanel and itemConfigData.ItemType == 2 and func then--是否是碎片可合成
|
||||
elseif isBagPanel and func --是否是碎片可合成
|
||||
and (itemConfigData.ItemType == ItemType.HeroDebris
|
||||
or itemConfigData.ItemType == ItemType.ZuoQiChip)
|
||||
then
|
||||
this.btnSureText.text = Language[10193]
|
||||
this.btnSure:SetActive(true)
|
||||
elseif isBagPanel and itemConfigData.ItemType == 10 and func then--是否宝箱可使用
|
||||
|
|
|
@ -660,24 +660,8 @@ function this.CalculateWarForceBase(sId, lv, rlv, tlv,curTreasure)
|
|||
end
|
||||
end
|
||||
end
|
||||
local heroPropertyScore = {}
|
||||
for i, v in ConfigPairs(ConfigManager.GetConfig(ConfigName.PropertyConfig)) do
|
||||
heroPropertyScore[i] = v.Score
|
||||
end
|
||||
local powerEndVal = 0
|
||||
for i, v in pairs(addAllProVal) do
|
||||
if v > 0 then
|
||||
local curProConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, i)
|
||||
if curProConfigData then
|
||||
if curProConfigData.Style == 1 then
|
||||
powerEndVal = powerEndVal + v * heroPropertyScore[i]
|
||||
else
|
||||
powerEndVal = powerEndVal + v / 100 * heroPropertyScore[i]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return math.floor(powerEndVal)
|
||||
local powerEndVal = HeroPowerManager.CalPower(addAllProVal)
|
||||
return powerEndVal
|
||||
end
|
||||
end
|
||||
--获取宝物升级消耗
|
||||
|
|
|
@ -846,6 +846,7 @@ function this.SingleItemDataShow(_go, _itemData)
|
|||
if curHeroData.harmonyGongMing then
|
||||
this:OpenTips(nextEquipData,equipConfig[_itemData.id].Position)
|
||||
else
|
||||
-- Log("当前装备:"..tostring(nextEquipData.id).." 准备替换装备:"..tostring(_itemData.id))
|
||||
UIManager.OpenPanel(UIName.RewardEquipSingleShowPopup2, this,_itemData,4,false,nil, curHeroData,equipConfig[_itemData.id].Position,nextEquipData)
|
||||
end
|
||||
else
|
||||
|
@ -857,6 +858,12 @@ function this.SingleItemDataShow(_go, _itemData)
|
|||
end
|
||||
--刷新当前英雄装备坑位的信息
|
||||
function this.UpdateEquipPosHeroData(_equipOrTreasure, _type, _selectEquipDataList, _oldSelectEquip, position) --type
|
||||
-- if _selectEquipDataList then
|
||||
-- LogYellow("_type:"..tostring(_type).." 新装备:"..tostring(_selectEquipDataList[1].id))
|
||||
-- end
|
||||
-- if _oldSelectEquip then
|
||||
-- LogYellow("旧装备:"..tostring(_oldSelectEquip.id))
|
||||
-- end
|
||||
--1 穿单件装备 2 卸单件装备 3 替换单件装备 4 一键穿装备 5一键脱装备
|
||||
if _type == 1 then
|
||||
effectList[position]:SetActive(false)
|
||||
|
@ -920,11 +927,11 @@ function this.UpdateEquipPosHeroData(_equipOrTreasure, _type, _selectEquipDataLi
|
|||
end
|
||||
|
||||
--英雄替换新选择装备
|
||||
if curHeroEquipDatas[curSelectEquipData.equipConfig.Position] then
|
||||
if curHeroEquipDatas[equipConfig[curSelectEquipData.id].Position] then
|
||||
for i = 1, #curHeroData.equipIdList do
|
||||
if
|
||||
tonumber(curHeroData.equipIdList[i]) ==
|
||||
tonumber(curHeroEquipDatas[curSelectEquipData.equipConfig.Position].id)
|
||||
tonumber(curHeroEquipDatas[equipConfig[curSelectEquipData.id].Position].id)
|
||||
then
|
||||
curHeroData.equipIdList[i] = curSelectEquipData.id
|
||||
break
|
||||
|
|
|
@ -166,6 +166,7 @@ function TailsManSouPanel:SetSingleData(go,data,index)
|
|||
self.itemPreList[go].slider.value = self.itemPreList[go].data.lv/self.itemPreList[go].data.maxLv
|
||||
self.itemPreList[go].progress.text = self.itemPreList[go].data.lv.."/"..self.itemPreList[go].data.maxLv
|
||||
self.itemPreList[go].red.gameObject:SetActive(self:CheckRedPoint(self.itemPreList[go].data.trumpList))
|
||||
Util.SetParticleSortLayer(go,self.sortingOrder + 1)
|
||||
for i = 1,math.max(#data.trumpList,#self.itemPreList[go].iconList) do
|
||||
if not data.trumpList[i] then
|
||||
self.itemPreList[go].iconList[i].go.gameObject:SetActive(false)
|
||||
|
@ -193,6 +194,9 @@ end
|
|||
|
||||
--界面层级发生改变(用于子类重写)
|
||||
function TailsManSouPanel:OnSortingOrderChange()
|
||||
for k,v in pairs(self.itemPreList) do
|
||||
Util.SetParticleSortLayer(v,self.sortingOrder + 1)
|
||||
end
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
|
|
|
@ -47,6 +47,8 @@ function TailsmanSoulMainPanel:InitComponent()
|
|||
self.skillGrid = Util.GetGameObject(self.transform, "skillLayout/proScrolllRect/proScroll")
|
||||
self.skillGridPos = self.skillGrid:GetComponent("RectTransform").anchoredPosition3D
|
||||
self.skillList = {}
|
||||
|
||||
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
|
||||
end
|
||||
|
||||
function TailsmanSoulMainPanel:BindEvent()
|
||||
|
@ -107,6 +109,7 @@ function TailsmanSoulMainPanel:OnOpen(curCompId)
|
|||
end
|
||||
|
||||
function TailsmanSoulMainPanel:OnShow()
|
||||
self.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
|
||||
self.trumpList,self.compMaxLv,self.complv,self.skillDataList = TailsManSoulManager.GetTailsmanSoulDataById(self.curCompId)
|
||||
self:SetTailsManList(self.trumpList,self.tailsGrid,self.tailsPre)
|
||||
self:ChangeTailsMan()
|
||||
|
@ -291,5 +294,6 @@ end
|
|||
function TailsmanSoulMainPanel:OnDestroy()
|
||||
self.proList = {}
|
||||
self.skillList = {}
|
||||
SubUIManager.Close(self.UpView)
|
||||
end
|
||||
return TailsmanSoulMainPanel
|
|
@ -470,7 +470,7 @@ function ShopViewNew:ShopItemAdapter(shopItem, itemData)
|
|||
local empty = Util.GetGameObject(shopItem, "empty")
|
||||
local lock = Util.GetGameObject(shopItem, "lock")
|
||||
local lockTip = Util.GetGameObject(shopItem, "lock/tip"):GetComponent("Text")
|
||||
|
||||
local new = Util.GetGameObject(shopItem, "GameObject/new")
|
||||
-- 计算数据
|
||||
local itemInfo = ShopManager.GetShopItemInfo(itemData.id)
|
||||
local curBuyCount = itemData.buyNum
|
||||
|
@ -560,6 +560,16 @@ function ShopViewNew:ShopItemAdapter(shopItem, itemData)
|
|||
if isshow then
|
||||
effect.gameObject:SetActive(true)
|
||||
end
|
||||
|
||||
if self.ShopType == SHOP_TYPE.QIANKUNBOX_SHOP then
|
||||
if SoulPrintManager.CheckSoulExist(con.Id) then
|
||||
new.gameObject:SetActive(false)
|
||||
else
|
||||
new.gameObject:SetActive(true)
|
||||
end
|
||||
else
|
||||
new.gameObject:SetActive(false)
|
||||
end
|
||||
|
||||
-- 购买事件
|
||||
Util.AddOnceClick(lock, function()
|
||||
|
|
Loading…
Reference in New Issue