Merge branch 'master_dev' into master_otnew

# Conflicts:
#	serverlogic/src/main/java/com/ljsd/jieling/util/FightDataUtil.java
master_0.05_aqlm
grimm 2024-01-08 17:01:41 +08:00
commit 3a32c8f5bb
4 changed files with 138 additions and 18 deletions

File diff suppressed because one or more lines are too long

View File

@ -12801,5 +12801,116 @@ local passivityList = {
end
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart, onRoundChange,nil,nil,role)
end,
--我方[a]神将附加自身[b][c]%的伤害属性,并附加[d]%[e]属性到神将身上 (d e不配置不生效)
--a[int],b[int],c[float],d[float],e[int]
[482]=function(role,args,id,judge)
local type=args[1]
local p1=args[2]
local v1=args[3]
local p2=args[4]
local v2=args[5]
local attack=0
local addPro=0
local onRoundChange=function(round)
if round==1 then
attack=floor(role:GetRoleData(BattlePropList[p1])*v1)
if p2 and v2 then
addPro = role:GetRoleData(BattlePropList[v2])*p2
end
local list = RoleManager.Query(function(v) return v.camp == role.camp and v.professionId==type end)
for i=1,#list do
--list[i].data:AddValue(RoleDataName.Attack,attack)
list[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, 0, RoleDataName.Attack, attack, 1))
if addPro~=0 then
--list[i].data:AddValue(BattlePropList[v2],addPro)
list[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[v2],addPro, 1))
end
end
end
end
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart, onRoundChange,nil,nil,role)
end,
-- 战斗中生命每减少[a]%,自身[b]属性就[c]改变[d]%,持续[e]回合
-- a[float],b[int 属性],c[int 改变类型],d[float],e[int]
[483] = function(role, args,id,judge)
local f1 = args[1]
local pro = args[2]
local ct = args[3]
local v1 = args[4]
local r1 = args[5]
local maxDamage= floor(role:GetRoleData(RoleDataName.MaxHp)*f1)
local curDamage=0
local onRoleBeDamaged = function(caster, damage, bCrit, finalDmg, damageType, dotType, skill)
curDamage=curDamage+finalDmg
local num=0
if curDamage>maxDamage then
num= floor(curDamage/maxDamage)
curDamage=curDamage- maxDamage*num
end
if num>0 then
role:AddBuff(Buff.Create(role, BuffName.PropertyChange, r1, BattlePropList[pro], v1*num, ct))
end
end
role.Event:AddEvent(BattleEventName.RoleBeDamaged, onRoleBeDamaged,nil,nil,role)
end,
-- 战斗中生命每减少[a]%,友军 [b]属性就[c]改变[d]%,持续[e]回合
-- a[float],b[int 属性],c[int 改变类型],d[float],e[int]
[484] = function(role, args,id,judge)
local f1 = args[1]
local pro = args[2]
local ct = args[3]
local v1 = args[4]
local r1 = args[5]
local maxDamage= floor(role:GetRoleData(RoleDataName.MaxHp)*f1)
local curDamage=0
local onRoleBeDamaged = function(caster, damage, bCrit, finalDmg, damageType, dotType, skill)
local num=0
curDamage=curDamage+finalDmg
if curDamage>maxDamage then
num=floor(curDamage/maxDamage)
curDamage=curDamage- maxDamage*num
end
if num>0 then
local list=RoleManager.Query(function(v) return v.camp == role.camp end)
for i=1,#list do
list[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, r1, BattlePropList[pro], v1*num, ct))
end
end
end
role.Event:AddEvent(BattleEventName.RoleBeDamaged, onRoleBeDamaged,nil,nil,role)
end,
--降低的护甲转移到[a],持续[b]回合
--a[int 1:自身 2全体],b[int]
[485] = function(role, args,id,judge)
local type=args[1]
local r1=args[2]
--移除破甲
local buffBeAdd=function(buff)
if buff.caster==role and buff.type==BuffName.PropertyChange and buff.changeType==4 then
local phy1=buff.target:GetRoleData(buff.propertyName)
BattleLogic.WaitForTrigger(1, function ()
local phy2=buff.target:GetRoleData(buff.propertyName)
local list={}
if type==1 then
table.insert(list,role)
else
list=RoleManager.Query(function(v) return v.camp == role.camp end)
end
for i=1,#list do
if phy1-phy2>0 then
list[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, r1,buff.propertyName, phy1-phy2, 1))
end
end
end)
end
end
role.Event:AddEvent(BattleEventName.BuffCaster, buffBeAdd,nil,nil,role)
end,
}
return passivityList

View File

@ -1,4 +1,10 @@
v1.0.5
v1.0.8
1、同步数
v1.0.7
1、同步数
v1.0.6
1、同步数
v1.0.5
1、同步数
v1.0.4
1、同步数据

View File

@ -1,16 +1,20 @@
package com.ljsd.jieling.util;
import rpc.protocols.CommonProto;
import com.alibaba.fastjson.JSONObject;
import config.*;
import manager.STableManager;
import org.luaj.vm2.LuaTable;
import org.luaj.vm2.LuaValue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import rpc.protocols.CommonProto;
import util.StringUtil;
import java.util.*;
public class FightDataUtil {
private static final Logger LOGGER = LoggerFactory.getLogger(FightDataUtil.class);
/**
*
@ -512,17 +516,16 @@ public class FightDataUtil {
int KeyFrame = sCombatControl.getKeyFrame();
int SkillDuration = sCombatControl.getSkillDuration();
int SkillNumber = sCombatControl.getSkillNumber();
int j = 2;
skill.rawset(j++, LuaValue.valueOf(KeyFrame/1000f));
skill.rawset(j++, LuaValue.valueOf(SkillDuration/1000f));
skill.rawset(j++, LuaValue.valueOf(SkillNumber));
skill.rawset(2, LuaValue.valueOf(KeyFrame/1000f));
skill.rawset(3, LuaValue.valueOf(SkillDuration/1000f));
skill.rawset(4, LuaValue.valueOf(SkillNumber));
// skill.rawset(j++, getSkillNumberTime(sCombatControl.getSkillNumbetTime()));
// skill.rawset(j++, getEffectArgs(sCombatControl.getAttackDisplaceoffset()));
List<LuaValue> effectList = getEffect(sSkillLogicVo);
int size = effectList.size();
if (size > 0) {
for (int i = 0; i < size; i++) {
skill.rawset(i + j++, effectList.get(i));
skill.rawset(i + 5, effectList.get(i));
}
}
}