出包前bug
parent
8fff0be3c3
commit
3ab0b9c3a8
|
@ -1984,7 +1984,7 @@ local passivityList = {
|
||||||
local i1 = args[1]
|
local i1 = args[1]
|
||||||
-- 释放技能后
|
-- 释放技能后
|
||||||
local onRoleHit = function(target)
|
local onRoleHit = function(target)
|
||||||
if target:IsDead() then
|
if target:IsDead() and BattleLogic.BuffMgr:HasBuff(target,BuffName.NoDead)==false then
|
||||||
for i = 1, i1 do
|
for i = 1, i1 do
|
||||||
role:AddSkill(BattleSkillType.Normal, false, true, nil)
|
role:AddSkill(BattleSkillType.Normal, false, true, nil)
|
||||||
end
|
end
|
||||||
|
@ -4398,7 +4398,17 @@ local passivityList = {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
--
|
--
|
||||||
[225] = function()
|
[225] = function(role, args)
|
||||||
|
--王振兴添加
|
||||||
|
local f1 = args[1]
|
||||||
|
local pro1 = args[2]
|
||||||
|
local ct1 = args[3]
|
||||||
|
local maxNum = args[4]
|
||||||
|
-- 紫+橙
|
||||||
|
local num = OutDataManager.GetOutData(role.camp, OutDataName.MisteryLiquidUsedTimes)
|
||||||
|
|
||||||
|
num = min(maxNum, num)
|
||||||
|
BattleUtil.AddProp(role, pro1, f1 * num, ct1)
|
||||||
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
@ -4656,6 +4666,7 @@ local passivityList = {
|
||||||
|
|
||||||
-- 紫+橙
|
-- 紫+橙
|
||||||
local num = OutDataManager.GetOutData(role.camp, OutDataName.MisteryLiquidUsedTimes)
|
local num = OutDataManager.GetOutData(role.camp, OutDataName.MisteryLiquidUsedTimes)
|
||||||
|
|
||||||
num = min(maxNum, num)
|
num = min(maxNum, num)
|
||||||
BattleUtil.AddProp(role, pro1, f1 * num, ct1)
|
BattleUtil.AddProp(role, pro1, f1 * num, ct1)
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -43,7 +43,7 @@ function Skill:Init(role, effectData, type, targets, isAdd, isRage) --type 0 异
|
||||||
for i=5, #effectData do
|
for i=5, #effectData do
|
||||||
local v = effectData[i]
|
local v = effectData[i]
|
||||||
local effectGroup = effectGroupPool:Get() -- chooseId, {effect1, effect2, ...}
|
local effectGroup = effectGroupPool:Get() -- chooseId, {effect1, effect2, ...}
|
||||||
effectGroup.chooseId = v[1] --chooseId
|
effectGroup.chooseId = v[1] -- chooseId
|
||||||
for j=2, #v do -- effectList
|
for j=2, #v do -- effectList
|
||||||
local effect = effectPool:Get() -- type, {args, ...}
|
local effect = effectPool:Get() -- type, {args, ...}
|
||||||
effect.type = v[j][1]
|
effect.type = v[j][1]
|
||||||
|
@ -99,7 +99,8 @@ local function DoEffect(caster, target, eff, duration, skill)
|
||||||
"type", e.type
|
"type", e.type
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Skill:takeEffect(caster, target, effects, effectIndex, duration, skill)
|
function Skill:takeEffect(caster, target, effects, effectIndex, duration, skill)
|
||||||
for k=1, #effects do
|
for k=1, #effects do
|
||||||
-- 如果不是第一个效果对列的第一个效果则判断是否命中
|
-- 如果不是第一个效果对列的第一个效果则判断是否命中
|
||||||
|
@ -162,7 +163,7 @@ function Skill:Cast(func)
|
||||||
local chooseId = effectGroup.chooseId
|
local chooseId = effectGroup.chooseId
|
||||||
local arr = self.effectTargets[i]
|
local arr = self.effectTargets[i]
|
||||||
if arr and #arr > 0 then
|
if arr and #arr > 0 then
|
||||||
--效果延迟1帧生效
|
-- 效果延迟1帧生效
|
||||||
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function()
|
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function()
|
||||||
local effects = effectGroup.effects
|
local effects = effectGroup.effects
|
||||||
local weight = floor(chooseId % 10000 / 100)
|
local weight = floor(chooseId % 10000 / 100)
|
||||||
|
@ -244,6 +245,7 @@ function Skill:GetMaxTargetNum()
|
||||||
end
|
end
|
||||||
return BattleUtil.GetMaxTargetNum(mainEffect.chooseId)
|
return BattleUtil.GetMaxTargetNum(mainEffect.chooseId)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 判断是否命中
|
-- 判断是否命中
|
||||||
function Skill:CheckTargetIsHit(role)
|
function Skill:CheckTargetIsHit(role)
|
||||||
return self.targetIsHit[role]
|
return self.targetIsHit[role]
|
||||||
|
@ -261,4 +263,3 @@ function Skill:EndSkill()
|
||||||
--
|
--
|
||||||
self.effectTargets = {}
|
self.effectTargets = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -228,8 +228,11 @@ function BattleLogic.TurnRound(debugTurn)
|
||||||
-- buff计算
|
-- buff计算
|
||||||
BattleLogic.BuffMgr:TurnUpdate(1) -- 计算恢复血量
|
BattleLogic.BuffMgr:TurnUpdate(1) -- 计算恢复血量
|
||||||
BattleLogic.BuffMgr:TurnUpdate(2) -- 计算持续伤害(除去流血)
|
BattleLogic.BuffMgr:TurnUpdate(2) -- 计算持续伤害(除去流血)
|
||||||
|
|
||||||
-- 如果角色无法释放技能
|
-- 如果角色无法释放技能
|
||||||
if not SkillRole:IsAvailable() then
|
if not SkillRole:IsAvailable() -- 角色不能释放技能
|
||||||
|
or (SkillRole:IsDead() and not BattleLogic.BuffMgr:HasBuff(SkillRole,BuffName.NoDead)) --将死但没有不死buff
|
||||||
|
then
|
||||||
BattleLogic.BuffMgr:TurnUpdate(3) -- 计算持续伤害(流血)
|
BattleLogic.BuffMgr:TurnUpdate(3) -- 计算持续伤害(流血)
|
||||||
BattleLogic.BuffMgr:TurnUpdate(4) -- 计算其他buff
|
BattleLogic.BuffMgr:TurnUpdate(4) -- 计算其他buff
|
||||||
BattleLogic.BuffMgr:PassUpdate() -- 计算buff轮数
|
BattleLogic.BuffMgr:PassUpdate() -- 计算buff轮数
|
||||||
|
|
|
@ -26,7 +26,7 @@ function Shield:OnStart()
|
||||||
self.target.buffFilter:Add(immune0)
|
self.target.buffFilter:Add(immune0)
|
||||||
-- 清除所有负面buff
|
-- 清除所有负面buff
|
||||||
BattleLogic.BuffMgr:ClearBuff(self.target, function (buff)
|
BattleLogic.BuffMgr:ClearBuff(self.target, function (buff)
|
||||||
return buff.type == BuffName.Control or buff.type == BuffName.Dot
|
return buff.type == BuffName.Control or buff.type == BuffName.DOT
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -52,6 +52,7 @@ BattleEventName = {
|
||||||
|
|
||||||
HitMiss = indexAdd(),
|
HitMiss = indexAdd(),
|
||||||
BeHitMiss = indexAdd(),
|
BeHitMiss = indexAdd(),
|
||||||
|
|
||||||
CritDamageReduceFactor = indexAdd(), -- 暴击伤害减免系数
|
CritDamageReduceFactor = indexAdd(), -- 暴击伤害减免系数
|
||||||
|
|
||||||
SkillCast = indexAdd(), -- 技能攻击前
|
SkillCast = indexAdd(), -- 技能攻击前
|
||||||
|
|
|
@ -394,7 +394,6 @@ function BattleUtil.CalDamage(skill, atkRole, defRole, damageType, baseFactor, i
|
||||||
if atkRole.isTeam and not defRole:IsDead() then
|
if atkRole.isTeam and not defRole:IsDead() then
|
||||||
return BattleUtil.ApplyDamage(skill, atkRole, defRole, damageType), false
|
return BattleUtil.ApplyDamage(skill, atkRole, defRole, damageType), false
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 计算技能额外伤害系数加成
|
-- 计算技能额外伤害系数加成
|
||||||
baseFactor = baseFactor or 1
|
baseFactor = baseFactor or 1
|
||||||
local factorFunc = function(exFactor) baseFactor = baseFactor + exFactor end
|
local factorFunc = function(exFactor) baseFactor = baseFactor + exFactor end
|
||||||
|
@ -544,6 +543,9 @@ function BattleUtil.CheckIsHit(atkRole, defRole)
|
||||||
return isHit
|
return isHit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function BattleUtil.RandomAction(rand, action)
|
function BattleUtil.RandomAction(rand, action)
|
||||||
if Random.Range01() <= rand and action then
|
if Random.Range01() <= rand and action then
|
||||||
action()
|
action()
|
||||||
|
|
|
@ -10,8 +10,8 @@ import com.ljsd.jieling.logic.dao.TimeControllerOfFunction;
|
||||||
public class ChampionFunction implements FunctionManager {
|
public class ChampionFunction implements FunctionManager {
|
||||||
@Override
|
@Override
|
||||||
public void startAction(TimeControllerOfFunction timeControllerOfFunction) throws Exception {
|
public void startAction(TimeControllerOfFunction timeControllerOfFunction) throws Exception {
|
||||||
ChampionshipLogic.start();
|
// ChampionshipLogic.start();
|
||||||
Poster.getPoster().dispatchEvent(new FunctionRefreshEvent(FunctionIdEnum.Arena.getFunctionType(),-1));
|
// Poster.getPoster().dispatchEvent(new FunctionRefreshEvent(FunctionIdEnum.Arena.getFunctionType(),-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -481,7 +481,11 @@ public class ChampionshipLogic {
|
||||||
public static CommonProto.TeamOneInfo.Builder getChampionBattleInfo(int uid) throws Exception {
|
public static CommonProto.TeamOneInfo.Builder getChampionBattleInfo(int uid) throws Exception {
|
||||||
SArenaRobotConfig sArenaRobotConfig = SArenaRobotConfig.getsArenaRobotConfigById(uid);
|
SArenaRobotConfig sArenaRobotConfig = SArenaRobotConfig.getsArenaRobotConfigById(uid);
|
||||||
if (sArenaRobotConfig != null) {
|
if (sArenaRobotConfig != null) {
|
||||||
return PlayerLogic.getInstance().getRobotTeamInfo(sArenaRobotConfig);
|
return CommonProto.TeamOneInfo.newBuilder()
|
||||||
|
.setLevel(sArenaRobotConfig.getRobotLevel())
|
||||||
|
.setName(sArenaRobotConfig.getRobotName())
|
||||||
|
.setUid(sArenaRobotConfig.getId());
|
||||||
|
// return PlayerLogic.getInstance().getRobotTeamInfo(sArenaRobotConfig);
|
||||||
}
|
}
|
||||||
MemberInfo memberInfo = RedisUtil.getInstence().getMapEntry(RedisKey.CHAMPION_JOIN, "", Integer.toString(uid), MemberInfo.class);
|
MemberInfo memberInfo = RedisUtil.getInstence().getMapEntry(RedisKey.CHAMPION_JOIN, "", Integer.toString(uid), MemberInfo.class);
|
||||||
FamilyFightInfo fightInfo = memberInfo.getFightInfo();
|
FamilyFightInfo fightInfo = memberInfo.getFightInfo();
|
||||||
|
@ -497,25 +501,25 @@ public class ChampionshipLogic {
|
||||||
.setHeadFrame(playerManager.getHeadFrame())
|
.setHeadFrame(playerManager.getHeadFrame())
|
||||||
.setLevel(playerManager.getLevel())
|
.setLevel(playerManager.getLevel())
|
||||||
.setName(playerManager.getNickName()).setUid(uid);
|
.setName(playerManager.getNickName()).setUid(uid);
|
||||||
CommonProto.TeamOneTeamInfo.Builder teamInfo = CommonProto.TeamOneTeamInfo.newBuilder();
|
// CommonProto.TeamOneTeamInfo.Builder teamInfo = CommonProto.TeamOneTeamInfo.newBuilder();
|
||||||
teamInfo.setTotalForce(fightInfo.getForce());
|
// teamInfo.setTotalForce(fightInfo.getForce());
|
||||||
if (!fightInfo.getPokenmonIds().isEmpty()) {
|
// if (!fightInfo.getPokenmonIds().isEmpty()) {
|
||||||
teamInfo.addAllPokemonInfos(fightInfo.getPokenmonIds());
|
// teamInfo.addAllPokemonInfos(fightInfo.getPokenmonIds());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
// int i = 1;
|
//// int i = 1;
|
||||||
for (Map.Entry<String, FamilyHeroInfo> entry : fightInfo.getHeroAttribute().entrySet()) {
|
// for (Map.Entry<String, FamilyHeroInfo> entry : fightInfo.getHeroAttribute().entrySet()) {
|
||||||
FamilyHeroInfo familyHeroInfo = entry.getValue();
|
// FamilyHeroInfo familyHeroInfo = entry.getValue();
|
||||||
teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder()
|
// teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder()
|
||||||
.setHeroid(entry.getKey())
|
// .setHeroid(entry.getKey())
|
||||||
.setHeroTid(familyHeroInfo.getTempleteId())
|
// .setHeroTid(familyHeroInfo.getTempleteId())
|
||||||
.setStar(familyHeroInfo.getStar())
|
// .setStar(familyHeroInfo.getStar())
|
||||||
.setLevel(familyHeroInfo.getLevel())
|
// .setLevel(familyHeroInfo.getLevel())
|
||||||
.setPosition(familyHeroInfo.getPosition())
|
// .setPosition(familyHeroInfo.getPosition())
|
||||||
.build()
|
// .build()
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
oneInfo.setTeam(teamInfo);
|
// oneInfo.setTeam(teamInfo);
|
||||||
return oneInfo;
|
return oneInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,6 +134,9 @@ public class FightDataUtil {
|
||||||
LuaValue detail = new LuaTable();
|
LuaValue detail = new LuaTable();
|
||||||
int passivityId = Integer.parseInt(unitSkill[i]);
|
int passivityId = Integer.parseInt(unitSkill[i]);
|
||||||
SPassiveSkillLogicConfig sPassiveSkillLogicConfig = SPassiveSkillLogicConfig.getConfig(passivityId);
|
SPassiveSkillLogicConfig sPassiveSkillLogicConfig = SPassiveSkillLogicConfig.getConfig(passivityId);
|
||||||
|
if(sPassiveSkillLogicConfig.getEffectiveRange()!=1){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
detail.rawset(1, LuaValue.valueOf(sPassiveSkillLogicConfig.getType()));
|
detail.rawset(1, LuaValue.valueOf(sPassiveSkillLogicConfig.getType()));
|
||||||
List<LuaValue> effectList = parseArraayToLuaValues(sPassiveSkillLogicConfig.getValue());
|
List<LuaValue> effectList = parseArraayToLuaValues(sPassiveSkillLogicConfig.getValue());
|
||||||
int size = effectList.size();
|
int size = effectList.size();
|
||||||
|
|
|
@ -3,6 +3,8 @@ package config;
|
||||||
import manager.STableManager;
|
import manager.STableManager;
|
||||||
import manager.Table;
|
import manager.Table;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Table(name ="ArenaSetting")
|
@Table(name ="ArenaSetting")
|
||||||
public class SArenaSetting implements BaseConfig {
|
public class SArenaSetting implements BaseConfig {
|
||||||
|
|
||||||
|
@ -18,6 +20,8 @@ public class SArenaSetting implements BaseConfig {
|
||||||
|
|
||||||
private int battleFree;
|
private int battleFree;
|
||||||
|
|
||||||
|
private int[] cost;
|
||||||
|
|
||||||
private int item;
|
private int item;
|
||||||
|
|
||||||
private int[] price;
|
private int[] price;
|
||||||
|
@ -26,10 +30,12 @@ public class SArenaSetting implements BaseConfig {
|
||||||
|
|
||||||
private int pveNum;
|
private int pveNum;
|
||||||
|
|
||||||
private int[] cost;
|
|
||||||
|
|
||||||
private int mostTime;
|
private int mostTime;
|
||||||
|
|
||||||
|
private int battleWinReward;
|
||||||
|
|
||||||
|
private int battleLoseReward;
|
||||||
|
|
||||||
private static SArenaSetting config;
|
private static SArenaSetting config;
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,6 +48,7 @@ public class SArenaSetting implements BaseConfig {
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
@ -66,6 +73,10 @@ public class SArenaSetting implements BaseConfig {
|
||||||
return battleFree;
|
return battleFree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int[] getCost() {
|
||||||
|
return cost;
|
||||||
|
}
|
||||||
|
|
||||||
public int getItem() {
|
public int getItem() {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
@ -82,11 +93,17 @@ public class SArenaSetting implements BaseConfig {
|
||||||
return pveNum;
|
return pveNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] getCost() {
|
|
||||||
return cost;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getMostTime() {
|
public int getMostTime() {
|
||||||
return mostTime;
|
return mostTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getBattleWinReward() {
|
||||||
|
return battleWinReward;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBattleLoseReward() {
|
||||||
|
return battleLoseReward;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue