Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Commit

Permalink
notice danger atk
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Apr 2, 2018
1 parent e11937c commit 5e779a2
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 52 deletions.
113 changes: 64 additions & 49 deletions src/lib/bossAction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,58 +25,73 @@ function lastKey (arr, per) {
}

export default {
'Lvl 200 Ultimate Bahamut' (bossData) {
let percent = bossData.hp / bossData.hpmax
'Lvl 200 Ultimate Bahamut': {
hp (bossData) {
let percent = bossData.hp / bossData.hpmax

let atks = {
1.0: '',
0.75: '单体攻击 可能会上标记 有标记时下一回合五彩大炮',
0.50: '喷火AOE',
0.3: '不普攻',
0.10: '单体攻击',
0: 'aoe'
}
let nps = {
1.0: '',
0.85: '奥义不明',
0.75: '百分比白字吹风\n喷火 全体多段伤害 最后大伤害 附带灼热 降奥义',
0.5: '神光 光1w AOE',
0.3: 'DPT检查阶段 满豆超越',
0.1: '非OD:水AOE+驱散\n 土AOE+我方降连+超巴三连buff\nOD:大破',
0: '不清楚'
}
let specialActions = {
0.01: '1% 五彩大炮',
0.05: '5% 暗aoe 1w5',
0.15: '15% 大破',
0.22: '22%特动 水AOE 驱动',
0.28: '28 触发满豆',
0.3: '30 驱散',
0.35: '35特动 四属陨石',
0.4: '40特动 白字陨石',
0.45: '45特动 四属陨石',
0.5: '50特动 白字陨石',
0.55: '55特动 喷火 最后大伤害 附带石化',
0.7: '70特动 神光 附加印记',
0.75: '75特动 5w土伤害',
0.8: '80 触发满豆',
0.85: '85 喷火 全体多段伤害 最终大伤害 灼热 降奥义DB',
0.95: '95 1w风伤 高昂',
1.0: ''
}
let atks = {
1.0: '',
0.75: '单体攻击 可能会上标记 有标记时下一回合五彩大炮',
0.50: '喷火AOE',
0.3: '不普攻',
0.10: '单体攻击',
0: 'aoe'
}
let nps = {
1.0: '',
0.85: '奥义不明',
0.75: '百分比白字吹风\n喷火 全体多段伤害 最后大伤害 附带灼热 降奥义',
0.5: '神光 光1w AOE',
0.3: 'DPT检查阶段 满豆超越',
0.1: '非OD:水AOE+驱散\n 土AOE+我方降连+超巴三连buff\nOD:大破',
0: '不清楚'
}
let specialActions = {
0.01: '1% 五彩大炮',
0.05: '5% 暗aoe 1w5',
0.15: '15% 大破',
0.22: '22%特动 水AOE 驱动',
0.28: '28 触发满豆',
0.3: '30 驱散',
0.35: '35特动 四属陨石',
0.4: '40特动 白字陨石',
0.45: '45特动 四属陨石',
0.5: '50特动 白字陨石',
0.55: '55特动 喷火 最后大伤害 附带石化',
0.7: '70特动 神光 附加印记',
0.75: '75特动 5w土伤害',
0.8: '80 触发满豆',
0.85: '85 喷火 全体多段伤害 最终大伤害 灼热 降奥义DB',
0.95: '95 1w风伤 高昂',
1.0: ''
}

const nKey = nextKey(specialActions, percent)
const lKey = lastKey(specialActions, percent)
const aKey = nextKey(atks, percent)
const npKey = nextKey(nps, percent)
const nKey = nextKey(specialActions, percent)
const lKey = lastKey(specialActions, percent)
const aKey = nextKey(atks, percent)
const npKey = nextKey(nps, percent)

return {
special: {
next: specialActions[nKey],
last: specialActions[lKey]
},
atk: atks[aKey],
np: nps[npKey]
return {
special: {
next: specialActions[nKey],
last: specialActions[lKey]
},
atk: atks[aKey],
np: nps[npKey]
}
},
atk (atk) {
for (let cmd of atk.scenario) {
if (cmd.cmd === 'condition' && cmd.to === 'player') {
if (cmd.condition.debuff) {
for (let db of cmd.condition.debuff) {
if (db.status === '4002') {
return '被标记了,快求净化,下一回合五彩大炮了'
}
}
}
}
}
}
}
}
4 changes: 4 additions & 0 deletions src/renderer/components/config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
<el-switch v-model="configForm.forceProxyHttps" active-text="" inactive-text="">
</el-switch>
</el-form-item>
<el-form-item label="DEBUG mode">
<el-switch v-model="configForm.DEBUG" active-text="" inactive-text="">
</el-switch>
</el-form-item>
<el-form-item label="监控页端口">
<el-input-number v-model="configForm.webPort" :disabled='true' :min="0" :max="65535"></el-input-number>
</el-form-item>
Expand Down
9 changes: 7 additions & 2 deletions src/renderer/components/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<el-row>
<code>目前只会显示超巴的特动</code>
<el-switch v-model="voiceNotice" active-color="#13ce66" inactive-color="#ff4949"></el-switch>

</el-row>

<el-row>
Expand Down Expand Up @@ -46,6 +45,7 @@
import { ipcRenderer, shell } from 'electron'
import renderBus from '../renderBus'
import bossAction from '../../lib/bossAction'
const audio = new window.Audio('static/audio/oh-finally.ogg')
export default {
Expand All @@ -70,7 +70,7 @@ export default {
renderBus.$on('boss-update', (message) => {
vm.battleData.bossData.hp = message[1].bossUpdate.param.boss1_hp
let lastMsg = vm.lastAction
let { special, atk, np } = bossAction['Lvl 200 Ultimate Bahamut'](vm.battleData.bossData)
let {special, atk, np} = bossAction['Lvl 200 Ultimate Bahamut'].hp(vm.battleData.bossData)
vm.lastAction = special.last
vm.nextAction = special.next
vm.atk = atk
Expand Down Expand Up @@ -102,6 +102,11 @@ export default {
}
}
vm.messages.unshift({text: `攻击后血量 ${bossHpAfterAttack / vm.battleData.bossData.hpmax} %`})
let atkDanger = bossAction['Lvl 200 Ultimate Bahamut'].atk(content)
if (atkDanger) {
vm.messages.unshift({text: atkDanger})
this.playMusic()
}
}
if (data.type === 'skill') {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/renderBus.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const options = {
if (message[0] === 'raid' && message[1].hasOwnProperty('bossUpdate')) {
renderBus.$emit('boss-update', message)
} else {
console.log(message[0])
// console.log(message[0])
}
} catch (e) {
console.log(message)
Expand Down

0 comments on commit 5e779a2

Please sign in to comment.