Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
dbaac6a1c7
|
@ -1722,6 +1722,60 @@ local effectList = {
|
|||
buffRandomAction(f4, target, Buff.Create(caster, BuffName.DOT, f2, f2/f3, d1, dt, f1))
|
||||
end)
|
||||
end,
|
||||
--造成[a]%的[b]伤害,若暴击,[g][c]%概率改变我方随机1人[d]属性[e]%,持续[f]秒。
|
||||
--a[float],b[伤害类型],c[float],d[属性],e[float],f[int],g[改变类型]
|
||||
[92] = function(caster, target, args, interval)
|
||||
local f4 = args[1]
|
||||
local dt = args[2]
|
||||
local f3 = args[3]
|
||||
local pro1 = args[4]
|
||||
local f1 = args[5]
|
||||
local f2 = args[6]
|
||||
local ct = args[7]
|
||||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local dmg, crit = BattleUtil.CalDamage(caster, target, dt, f4)
|
||||
if crit then
|
||||
buffRandomAction(f3, target, Buff.Create(caster, BuffName.PropertyChange, f2, propertyList[pro1], f1, ct))
|
||||
end
|
||||
end)
|
||||
end,
|
||||
--造成[a]%的[b]伤害,若暴击,[c]概率驱散[d]个(0表示所有)[e]状态。
|
||||
--a[float],b[伤害类型],c[float],d[int],e[状态类型]
|
||||
[93] = function(caster, target, args, interval)
|
||||
local f1 = args[1]
|
||||
local dt = args[2]
|
||||
local f2 = args[3]
|
||||
local i1 = args[4]
|
||||
local ct = args[5]
|
||||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local dmg, crit = BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
if crit then
|
||||
BattleUtil.RandomAction(f2, function ()
|
||||
local count = 0
|
||||
BattleLogic.BuffMgr:ClearBuff(target, function (buff)
|
||||
local flag = false
|
||||
if ct == 1 then --持续恢复
|
||||
flag = buff.type == BuffName.HOT
|
||||
elseif ct == 2 then --护盾
|
||||
flag = buff.type == BuffName.Shield
|
||||
elseif ct == 3 then --增益状态
|
||||
flag = buff.isBuff == true
|
||||
elseif ct == 4 then --减益状态
|
||||
flag = buff.isDeBuff == true
|
||||
elseif ct == 5 then --持续伤害
|
||||
flag = buff.type == BuffName.DOT
|
||||
end
|
||||
if flag then
|
||||
count = count + 1
|
||||
end
|
||||
return (i1 == 0 or count <= i1) and flag
|
||||
end)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end
|
||||
}
|
||||
|
||||
return effectList
|
|
@ -25,7 +25,7 @@ end
|
|||
function Skill:Init(role, effectData, type) --type 0 异妖 1 点技 2 滑技
|
||||
local isTeamSkill = type == 0
|
||||
if type == 0 then --异妖
|
||||
self.cd = effectData[1] % 100 --异妖技能的cd数据为:类型*100 + cd
|
||||
self.cd = effectData[1] % 100 --异妖技能的cd数据为:类型*100 + 站位
|
||||
self.randomInStage2 = 0
|
||||
elseif type == 1 then --点技
|
||||
self.cd = 0 --点技 cd为0
|
||||
|
|
|
@ -25,8 +25,6 @@ local playerTeamDummyRole = {camp = 0, Event = BattleEvent.New(), isTeam = true,
|
|||
local enemyTeamDummyRole = {camp = 1, Event = BattleEvent.New(), isTeam = true, curSkill = nil, isDebug = false}
|
||||
local playerTeamSkillList = {}
|
||||
local enemyTeamSkillList = {}
|
||||
local playerTeamSkillIndex
|
||||
local enemyTeamSkillIndex
|
||||
|
||||
local fightData
|
||||
local record
|
||||
|
@ -88,8 +86,6 @@ function BattleLogic.Init(maxTime, data, optionData)
|
|||
curBuffId = 0
|
||||
curFrame = 0
|
||||
|
||||
playerMP = 0
|
||||
enemyMP = 0
|
||||
stage = 0
|
||||
|
||||
playerTeamDummyRole.isDebug = false
|
||||
|
@ -110,10 +106,7 @@ function BattleLogic.StartOrder()
|
|||
BattleLogic.CurOrder = BattleLogic.CurOrder + 1
|
||||
stage = 0
|
||||
curStageFrame = 0
|
||||
|
||||
teamSkillCastIndex = 1
|
||||
playerTeamSkillIndex = 1
|
||||
enemyTeamSkillIndex = 1
|
||||
|
||||
if BattleLogic.CurOrder == 1 then
|
||||
for i=1, #fightData.playerData do
|
||||
|
@ -123,13 +116,16 @@ function BattleLogic.StartOrder()
|
|||
BattleLogic.AddRole(fightData.enemyData[BattleLogic.CurOrder][i], i)
|
||||
end
|
||||
|
||||
for i=1, #playerTeamSkillList do
|
||||
skillPool:Put(playerTeamSkillList[i])
|
||||
playerTeamSkillList[i]=nil
|
||||
for i=1,3 do
|
||||
if playerTeamSkillList[i] then
|
||||
skillPool:Put(playerTeamSkillList[i])
|
||||
playerTeamSkillList[i]=nil
|
||||
end
|
||||
end
|
||||
for i=1, #fightData.playerData.teamSkill do
|
||||
playerTeamSkillList[i] = skillPool:Get()
|
||||
playerTeamSkillList[i]:Init(playerTeamDummyRole, fightData.playerData.teamSkill[i], 0)
|
||||
local skill = skillPool:Get()
|
||||
skill:Init(playerTeamDummyRole, fightData.playerData.teamSkill[i], 0)
|
||||
playerTeamSkillList[skill.cd] = skill
|
||||
end
|
||||
for i=1, #fightData.playerData.teamPassive do
|
||||
for j=1, #fightData.playerData.teamPassive[i] do
|
||||
|
@ -143,13 +139,16 @@ function BattleLogic.StartOrder()
|
|||
end
|
||||
end
|
||||
|
||||
for i=1, #enemyTeamSkillList do
|
||||
skillPool:Put(enemyTeamSkillList[i])
|
||||
enemyTeamSkillList[i]=nil
|
||||
for i=1,3 do
|
||||
if enemyTeamSkillList[i] then
|
||||
skillPool:Put(enemyTeamSkillList[i])
|
||||
enemyTeamSkillList[i]=nil
|
||||
end
|
||||
end
|
||||
for i=1, #fightData.enemyData[BattleLogic.CurOrder].teamSkill do
|
||||
enemyTeamSkillList[i] = skillPool:Get()
|
||||
enemyTeamSkillList[i]:Init(enemyTeamDummyRole, fightData.enemyData[BattleLogic.CurOrder].teamSkill[i], 0)
|
||||
local skill = skillPool:Get()
|
||||
skill:Init(enemyTeamDummyRole, fightData.enemyData[BattleLogic.CurOrder].teamSkill[i], 0)
|
||||
enemyTeamSkillList[skill.cd] = skill
|
||||
end
|
||||
for i=1, #fightData.enemyData[BattleLogic.CurOrder].teamPassive do
|
||||
for j=1, #fightData.enemyData[BattleLogic.CurOrder].teamPassive[i] do
|
||||
|
@ -190,6 +189,10 @@ function BattleLogic.StartOrder()
|
|||
end
|
||||
end
|
||||
|
||||
function BattleLogic.GetTeamSkill(camp, pos)
|
||||
return camp == 0 and playerTeamSkillList[pos] or enemyTeamSkillList[pos]
|
||||
end
|
||||
|
||||
function BattleLogic.GetTeamSkillCastSlider()
|
||||
if playerTeamDummyRole.isDebug then
|
||||
return 0
|
||||
|
@ -372,22 +375,15 @@ function BattleLogic.Update()
|
|||
end
|
||||
|
||||
if teamSkillCastIndex <= #teamSkillCastTime and curStageFrame > teamSkillCastTime[teamSkillCastIndex] then
|
||||
if not playerTeamDummyRole.isDebug and playerTeamSkillList[teamSkillCastIndex] then
|
||||
playerTeamSkillList[teamSkillCastIndex]:Cast()
|
||||
end
|
||||
if not enemyTeamDummyRole.isDebug and enemyTeamSkillList[teamSkillCastIndex] then
|
||||
enemyTeamSkillList[teamSkillCastIndex]:Cast()
|
||||
end
|
||||
teamSkillCastIndex = teamSkillCastIndex + 1
|
||||
end
|
||||
|
||||
if playerTeamSkillIndex < teamSkillCastIndex then
|
||||
if not playerTeamDummyRole.isDebug and playerTeamSkillList[playerTeamSkillIndex] then
|
||||
playerTeamSkillList[playerTeamSkillIndex]:Cast()
|
||||
playerTeamSkillIndex = playerTeamSkillIndex + 1
|
||||
end
|
||||
end
|
||||
if enemyTeamSkillIndex < teamSkillCastIndex then
|
||||
if not enemyTeamDummyRole.isDebug and enemyTeamSkillList[enemyTeamSkillIndex] then
|
||||
enemyTeamSkillList[enemyTeamSkillIndex]:Cast()
|
||||
enemyTeamSkillIndex = enemyTeamSkillIndex + 1
|
||||
end
|
||||
end
|
||||
|
||||
local index = 1
|
||||
while index <= tbActionList.size do
|
||||
local action = tbActionList.buffer[index]
|
||||
|
@ -479,26 +475,14 @@ end
|
|||
|
||||
function BattleLogic.CastTeamSkill(camp)
|
||||
if camp == 0 then
|
||||
local teamSkill = playerTeamSkillList[playerTeamSkillIndex]
|
||||
local teamSkill = playerTeamSkillList[teamSkillCastIndex]
|
||||
if teamSkill then
|
||||
teamSkill:Cast()
|
||||
if playerTeamSkillIndex == #playerTeamSkillList then
|
||||
playerTeamSkillIndex = 1
|
||||
else
|
||||
playerTeamSkillIndex = playerTeamSkillIndex + 1
|
||||
end
|
||||
playerMP = 0
|
||||
end
|
||||
else
|
||||
local teamSkill = enemyTeamSkillList[enemyTeamSkillIndex]
|
||||
local teamSkill = enemyTeamSkillList[teamSkillCastIndex]
|
||||
if teamSkill then
|
||||
teamSkill:Cast()
|
||||
if enemyTeamSkillIndex == #enemyTeamSkillList then
|
||||
enemyTeamSkillIndex = 1
|
||||
else
|
||||
enemyTeamSkillIndex = enemyTeamSkillIndex + 1
|
||||
end
|
||||
enemyMP = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1003,16 +1003,22 @@ public class HeroLogic {
|
|||
public String getPokenmonSkills(User user,int teamId){
|
||||
StringBuilder pokenSkillResult = new StringBuilder();
|
||||
List<TeamPosForPokenInfo> teamPosForPokenInfos = user.getTeamPosManager().getTeamPosForPoken().get(teamId);
|
||||
if (teamPosForPokenInfos==null){
|
||||
if (teamPosForPokenInfos==null || teamPosForPokenInfos.isEmpty()){
|
||||
return "";
|
||||
}
|
||||
Map<Integer, Pokemon> pokemonMap = user.getPokemonManager().getPokemonMap();
|
||||
Collections.sort(teamPosForPokenInfos);
|
||||
for(TeamPosForPokenInfo teamPosForPokenInfo:teamPosForPokenInfos){
|
||||
int size = teamPosForPokenInfos.size();
|
||||
for(int i=0;i<size;i++){
|
||||
TeamPosForPokenInfo teamPosForPokenInfo = teamPosForPokenInfos.get(i);
|
||||
int pokemonId = teamPosForPokenInfo.getPokenId();
|
||||
int position = teamPosForPokenInfo.getPosition();
|
||||
Pokemon pokemon = pokemonMap.get(pokemonId);
|
||||
SDifferDemonsStageConfig sDifferDemonsStageConfig = SDifferDemonsStageConfig.getsDifferDemonsStageConfigMap(pokemonId*100 + pokemon.getAllStage());
|
||||
pokenSkillResult.append(sDifferDemonsStageConfig.getSkillId()).append("#");
|
||||
pokenSkillResult.append(position).append("#").append(sDifferDemonsStageConfig.getSkillId());
|
||||
if(i!=size-1){
|
||||
pokenSkillResult.append("|");
|
||||
}
|
||||
}
|
||||
return pokenSkillResult.toString();
|
||||
}
|
||||
|
@ -1766,8 +1772,9 @@ public class HeroLogic {
|
|||
}else if(pokemon.getAllStage()>=SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_rankup_differ_content_parm)){
|
||||
message = SErrorCodeEerverConfig.getI18NMessage("lamp_rankup_differ_content", new Object[]{user.getPlayerInfoManager().getNickName(), sDifferDemonsConfig.getName(),pokemon.getAllStage()});
|
||||
}
|
||||
ChatLogic.getInstance().sendSysChatMessage(message,Global.DILIGENT,sDifferDemonsConfig.getId(),0,0,0,0,0);
|
||||
|
||||
if(message!=null){
|
||||
ChatLogic.getInstance().sendSysChatMessage(message,Global.DILIGENT,sDifferDemonsConfig.getId(),0,0,0,0,0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -217,13 +217,15 @@ public class FightDataUtil {
|
|||
|
||||
private static LuaValue getTeamSkill(String pokemonSkill) {
|
||||
LuaValue teamSkill = new LuaTable();
|
||||
if (pokemonSkill.equals("") || pokemonSkill==null){
|
||||
if (StringUtil.isEmpty(pokemonSkill)){
|
||||
return teamSkill;
|
||||
}
|
||||
String[] skills = pokemonSkill.trim().split("#");
|
||||
String[] skills = pokemonSkill.trim().split("\\|");
|
||||
for (int i = 0; i < skills.length; i++) {
|
||||
if (Integer.parseInt(skills[i])>0){
|
||||
teamSkill.rawset(i + 1, getSkill(skills[i]));
|
||||
String skillAndPos = skills[i];
|
||||
String[] skillAndPosItem = skillAndPos.split("#");
|
||||
if (Integer.parseInt(skillAndPosItem[1])>0){
|
||||
teamSkill.rawset(i + 1, getSkill(skillAndPosItem[1],skillAndPosItem[0]));
|
||||
}
|
||||
}
|
||||
return teamSkill;
|
||||
|
@ -269,14 +271,18 @@ public class FightDataUtil {
|
|||
return property;
|
||||
}
|
||||
|
||||
private static LuaValue getSkill(String skillId) {
|
||||
private static LuaValue getSkill(String skillId,String...args) {
|
||||
LuaValue skill = new LuaTable();
|
||||
if (skillId==null || skillId.equals("") ){
|
||||
return skill;
|
||||
}
|
||||
SSkillLogicVo sSkillLogicVo = SSkillLogicConfig.getsSkillLogicVo(Integer.valueOf(skillId));
|
||||
if (sSkillLogicVo != null && sSkillLogicVo.getSkillTargetVoList().size()>0) {
|
||||
skill.rawset(1, LuaValue.valueOf(sSkillLogicVo.getCd()));
|
||||
float cd = sSkillLogicVo.getCd();
|
||||
if(args!=null&&args.length>0){
|
||||
cd+=Integer.parseInt(args[0]);
|
||||
}
|
||||
skill.rawset(1, LuaValue.valueOf(cd));
|
||||
List<LuaValue> effectList = getEffect(sSkillLogicVo);
|
||||
int size = effectList.size();
|
||||
if (size > 0) {
|
||||
|
|
Loading…
Reference in New Issue