Browse Source

新增转生属性:生命回复速度

dev
许孟阳 2 months ago
parent
commit
142980034b
  1. BIN
      public/img/attribute/recover.png
  2. 2
      src/config/assets.ts
  3. 3
      src/config/base.ts
  4. 1
      src/config/equips/constant.ts
  5. 1
      src/config/i18n/zh.ts
  6. 1
      src/store/action.ts
  7. 2
      src/store/state.ts
  8. 1
      src/views/dungeon/battle.vue
  9. 5
      src/views/message/attribute.vue

BIN
public/img/attribute/recover.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

2
src/config/assets.ts

@ -30,6 +30,7 @@ export const attr_icon_urls = { @@ -30,6 +30,7 @@ export const attr_icon_urls = {
def: root + '/img/attribute/icon_11.png',
eva: root + '/img/attribute/S_EVA.png',
bloc: root + '/img/attribute/S_BLOC.png',
recoverSpeed: root + '/img/attribute/recover.png',
moveSpeed: root + '/img/attribute/S_EVA.png',
battleSpeed: root + '/img/attribute/S_EVA.png',
};
@ -43,7 +44,6 @@ export const playerImg = root + '/img/player.png'; @@ -43,7 +44,6 @@ export const playerImg = root + '/img/player.png';
export const playerImg2 = root + '/img/player2.png';
export const red_icon = root + '/img/red.gif';
export const warning_icon = root + '/img/tip/warning.png';
export const dungeon_icon = {

3
src/config/base.ts

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
export const backpack_num = 32;
export const reborn_arrts = ['hp', 'atk', 'crit', 'critDmg', 'def', 'bloc', 'moveSpeed', 'battleSpeed'];
export const reborn_arrts = ['hp', 'atk', 'crit', 'critDmg', 'def', 'bloc', 'recoverSpeed', 'moveSpeed', 'battleSpeed'];
export const reborn_point_coefficients = {
hp: 10,
atk: 3,
@ -7,6 +7,7 @@ export const reborn_point_coefficients = { @@ -7,6 +7,7 @@ export const reborn_point_coefficients = {
critDmg: 1,
def: 2,
bloc: 2,
recoverSpeed: 4,
moveSpeed: 4,
battleSpeed: 4,
};

1
src/config/equips/constant.ts

@ -67,6 +67,7 @@ export const attr_unitys = { @@ -67,6 +67,7 @@ export const attr_unitys = {
hpPercent: '%',
defPercent: '%',
blocPercent: '%',
recoverSpeed: '%',
moveSpeed: '%',
battleSpeed: '%',
};

1
src/config/i18n/zh.ts

@ -97,6 +97,7 @@ export default class Zh { @@ -97,6 +97,7 @@ export default class Zh {
eva = ['闪避值', '角色闪避几率', '闪避几率采用非线性计算', '多个闪避来源自身乘法叠加'];
bloc = ['格挡', '角色格挡伤害', '计算护甲后再计算格挡伤害就是最终受到的伤害'];
blocPercent = ['格挡', '角色格挡百分比'];
recoverSpeed = ['生命回复速度'];
moveSpeed = ['副本行进速度'];
battleSpeed = ['副本战斗速度'];
dps = ['秒伤', 'DPS:角色每秒伤害', '这个只是伤害数据,并没有统计防御属性,所以只是作为战斗力评估的一个依据'];

1
src/store/action.ts

@ -103,6 +103,7 @@ export const loadGame = ({ commit }, data?) => { @@ -103,6 +103,7 @@ export const loadGame = ({ commit }, data?) => {
commit('set_backpack', data.backpack);
commit('set_auto_sell', data.autoSell);
commit('set_shop', data.shop);
data.reborn && (data.reborn.recoverSpeed = 0);
commit('set_reborn_points', data.reborn);
commit('set_sys_info', { msg: t('loadSuccess'), type: 'win' });
}

2
src/store/state.ts

@ -28,6 +28,7 @@ export default { @@ -28,6 +28,7 @@ export default {
critDmg: 0,
def: 0,
bloc: 0,
recoverSpeed: 0,
moveSpeed: 0,
battleSpeed: 0,
},
@ -40,6 +41,7 @@ export default { @@ -40,6 +41,7 @@ export default {
critDmg: 0,
def: 0,
bloc: 0,
recoverSpeed: 0,
moveSpeed: 0,
battleSpeed: 0,
},

1
src/views/dungeon/battle.vue

@ -105,7 +105,6 @@ const battleWithMonster = (monster) => { @@ -105,7 +105,6 @@ const battleWithMonster = (monster) => {
return new Promise((resolve, reject) => {
const player = state.playerAttribute.attribute;
const battleTime = Math.round(player_battle_time * 100 / (100 + state.rebornAttribute.battleSpeed))
const getMsg = (i18nName, takeDmg) => {
return t(i18nName).replace('${lv}', monster.lv).replace('${name}', t('difficulty.' + props.dungeon?.difficulty) + t(monster.type)).replace('${dmg}', takeDmg + '');
};

5
src/views/message/attribute.vue

@ -72,10 +72,13 @@ let interval = 0; @@ -72,10 +72,13 @@ let interval = 0;
const attribute = computed(() => {
return state.playerAttribute.attribute;
})
const recoverSpeed = computed(() => {
return state.rebornAttribute.recoverSpeed;
})
onMounted(() => {
interval = setInterval(() => {
commit('add_player_curhp', Math.ceil(attribute.value.hp * 0.02))
commit('add_player_curhp', Math.ceil(attribute.value.hp * 0.02 * (1 + recoverSpeed.value / 100)))
}, 1000);
});
onBeforeUnmount(() => {

Loading…
Cancel
Save