Compare commits

...

22 Commits
master ... 2.0

Author SHA1 Message Date
许孟阳 a6388f547a 在线人数统计增加服务器标识 3 weeks ago
许孟阳 a18345e705 修复自动强化BUG 3 weeks ago
许孟阳 9483e8b64a '修复增加金币获取的装备不能叠加的BUG', 3 weeks ago
许孟阳 89365ef6a4 青光被动数值调整 3 weeks ago
许孟阳 9af8e0fde9 新增神话装备:金戒指,最初的彼岸花,鱼蓝被动数值调整 3 weeks ago
许孟阳 61b04c730a 装备图标增加星级展示 3 weeks ago
许孟阳 62931caf59 Update reforge.vue 3 weeks ago
许孟阳 ac65e22398 功能加速优化逻辑 3 weeks ago
许孟阳 e239402c0a '暴雪,青光,杀意被动数值调整 3 weeks ago
许孟阳 ce55ae061f Update index.ts 3 weeks ago
许孟阳 c32bfd3771 游戏加速改为功能加速,取消背包格子限制 3 weeks ago
许孟阳 8b9e5294fa 修复装备融合BUG可以不消耗材料BUG 3 weeks ago
许孟阳 f4e1316d19 降低太古升2/3星费用 3 weeks ago
许孟阳 24db1bb57a 加点速度也受游戏加速影响 3 weeks ago
许孟阳 5d6f934d67 修复远古装备也能做融合材料BUG 3 weeks ago
许孟阳 342063128d Update index.ts 3 weeks ago
许孟阳 de495a72b7 调整融合费用 3 weeks ago
许孟阳 1c1f3df89b 加强存档校验,系统设置新增游戏加速 3 weeks ago
许孟阳 227de3563f 添加太古装备融合功能 3 weeks ago
许孟阳 25e44ee376 Update point.vue 3 weeks ago
许孟阳 5d0b6716a7 提高技能裂银河优先级,降低技能琉璃盘优先级 3 weeks ago
许孟阳 59e0de0f6b 新增:银河裂,荧光层数BUG 3 weeks ago
  1. 1
      java/application.properties
  2. 1
      java/src/main/java/vip/xumy/idle/server/pojo/ActivityCount.java
  3. 4
      java/src/main/java/vip/xumy/idle/server/worker/ActivityCountWorker.java
  4. BIN
      public/img/effect/gotcha.png
  5. 24
      src/assets/css/base-768.scss
  6. 66
      src/assets/css/base.scss
  7. 291
      src/assets/css/index-768.scss
  8. 2
      src/components/dialog.vue
  9. 45
      src/components/equip-icon.vue
  10. 19
      src/components/equip.vue
  11. 1
      src/config/assets.ts
  12. 4
      src/config/equips/armor.ts
  13. 5
      src/config/equips/base.ts
  14. 2
      src/config/equips/bean.ts
  15. 4
      src/config/equips/bracers.ts
  16. 4
      src/config/equips/jewelry.ts
  17. 14
      src/config/equips/neck.ts
  18. 4
      src/config/equips/pants.ts
  19. 14
      src/config/equips/ring.ts
  20. 4
      src/config/equips/shoes.ts
  21. 15
      src/config/equips/weapon.ts
  22. 9
      src/config/i18n/zh/euips.ts
  23. 44
      src/config/i18n/zh/index.ts
  24. 1
      src/config/i18n/zh/setting.ts
  25. 4
      src/config/i18n/zh/skills.ts
  26. 13
      src/config/skill/buff.ts
  27. 6
      src/config/skill/jewelry.ts
  28. 6
      src/config/skill/neck.ts
  29. 4
      src/config/skill/pants.ts
  30. 8
      src/config/skill/ring.ts
  31. 70
      src/config/skill/weapon.ts
  32. 1
      src/main.ts
  33. 12
      src/store/action.ts
  34. 3
      src/store/mutation.ts
  35. 7
      src/store/state.ts
  36. 56
      src/tool/archive.ts
  37. 6
      src/tool/caller/attribute.ts
  38. 6
      src/tool/caller/battle.ts
  39. 7
      src/tool/formatter.ts
  40. 55
      src/views/archive.vue
  41. 4
      src/views/backpack/backpack.vue
  42. 39
      src/views/backpack/equip-menu/equip-menu.vue
  43. 82
      src/views/backpack/equip-menu/fusion/equip-select.vue
  44. 53
      src/views/backpack/equip-menu/fusion/equip.vue
  45. 134
      src/views/backpack/equip-menu/fusion/fusion.vue
  46. 3
      src/views/backpack/equip-menu/fusion/index.ts
  47. 3
      src/views/backpack/equip-menu/index.ts
  48. 42
      src/views/backpack/equip-menu/inherited.vue
  49. 104
      src/views/backpack/equip-menu/reforge.vue
  50. 123
      src/views/backpack/equip-menu/strengthen.vue
  51. 0
      src/views/backpack/grid/auto-sell.vue
  52. 10
      src/views/backpack/grid/grid.vue
  53. 3
      src/views/backpack/grid/index.ts
  54. 11
      src/views/point/point.vue
  55. 7
      src/views/save-game.vue
  56. 13
      src/views/setting.vue
  57. 42
      src/views/version/update-log.vue

1
java/application.properties

@ -5,3 +5,4 @@ spring.datasource.password=123456 @@ -5,3 +5,4 @@ spring.datasource.password=123456
login.token.timeout=10080
login.token.domain=
server.name=

1
java/src/main/java/vip/xumy/idle/server/pojo/ActivityCount.java

@ -23,5 +23,6 @@ public class ActivityCount { @@ -23,5 +23,6 @@ public class ActivityCount {
private String time;
private Integer num;
private String type;
private String server;
}

4
java/src/main/java/vip/xumy/idle/server/worker/ActivityCountWorker.java

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
package vip.xumy.idle.server.worker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@ -22,6 +23,8 @@ import vip.xumy.idle.server.service.WebSocketService; @@ -22,6 +23,8 @@ import vip.xumy.idle.server.service.WebSocketService;
public class ActivityCountWorker {
@Autowired
private IActivityCountMapper countMapper;
@Value("${server.name}")
private String server;
@Scheduled(cron = "0 * * * * ?")
public void aliveCount() {
@ -29,6 +32,7 @@ public class ActivityCountWorker { @@ -29,6 +32,7 @@ public class ActivityCountWorker {
count.setTime(DateUtil.format());
count.setNum(WebSocketService.CLIENT_MAP.keySet().size());
count.setType("A");
count.setServer(server);
countMapper.insert(count);
}

BIN
public/img/effect/gotcha.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

24
src/assets/css/base-768.scss

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
@media only screen and (max-width: 768px) {
button {
height: 1.8rem;
line-height: 1.6rem;
padding: 0 0.5rem;
margin-left: 0.2rem;
margin-right: 0.2rem;
font-size: 0.8rem;
}
//装备相关功能弹框通用样式
.equip-dialog {
width: 23rem;
.equip .name {
height: 2.5rem;
line-height: 2.5rem;
margin-left: 1rem;
font-size: 1rem;
}
.entry,
.extraEntry {
font-size: 1rem;
}
}
}

66
src/assets/css/base.scss

@ -143,10 +143,6 @@ select { @@ -143,10 +143,6 @@ select {
border-radius: 4px;
}
// .unique {
// background: linear-gradient(125deg, #c90e0d36, #5656d647, 40%, #867d1033, #2c846f4d) !important;
// }
.shabby {
color: #a1a1a1 !important;
}
@ -181,32 +177,42 @@ select { @@ -181,32 +177,42 @@ select {
color: transparent !important;
}
.fade-enter-active,
.fade-leave-active {
transition: 0.3s;
}
.fade-enter,
.fade-leave-to {
transform: translateX(100%);
}
.icon {
display: inline-block;
width: 0.25rem;
height: 0.25rem;
background-repeat: no-repeat;
background-size: contain;
padding: 2px;
background-position: center;
}
//装备相关功能弹框通用样式
.equip-dialog {
color: #f1f1f1;
width: 25rem;
height: auto;
background: rgba(0, 0, 0, 0.2);
border: #393839;
border-radius: 0.4rem;
padding: 1rem;
box-sizing: border-box;
.coins {
display: flex;
align-items: center !important;
justify-content: center;
font-size: 1.1rem;
color: #2fe20f;
}
.descript {
font-family: 'MaShanZheng' !important;
display: flex;
align-items: center !important;
justify-content: center;
font-size: 1.6rem;
padding: 1.4rem 0.7rem;
color: #efb96e;
}
.equip {
display: flex;
width: 100%;
justify-content: center;
@media only screen and (max-width: 768px) {
button {
height: 1.8rem;
line-height: 1.6rem;
padding: 0 0.5rem;
margin-left: 0.2rem;
margin-right: 0.2rem;
font-size: 0.8rem;
.name {
height: 3.5rem;
line-height: 3.5rem;
margin-left: 1.6rem;
font-size: 1.2rem;
}
}
}

291
src/assets/css/index-768.scss

@ -1,291 +0,0 @@ @@ -1,291 +0,0 @@
@media screen and (max-width: 768px) {
}
@media screen and (max-width: 768px) {
.body,
html,
#app {
width: 100%;
height: 100%;
overflow: hidden;
}
* {
user-select: text !important;
}
#app {
-webkit-tap-highlight-color: transparent;
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
.main {
.user-status {
width: calc(50% - 0.12rem);
height: calc(25% - 0.02rem);
padding: 0.05rem;
.hp {
padding-left: 0.08rem;
border: none;
height: 0.25rem;
img {
width: 0.35rem;
height: 0.35rem;
}
.value {
font-size: 0.18rem;
}
}
.lv {
padding-left: 0.08rem;
border: none;
height: 0.25rem;
img {
width: 0.35rem;
height: 0.35rem;
}
.value {
font-size: 0.18rem;
justify-content: space-between;
padding-right: 0.1rem;
}
}
.other {
margin-top: 0.02rem;
padding: 0.04rem;
border: 1px solid #ccc;
& > div {
padding-top: 0.02rem;
}
img {
width: 0.3rem;
height: 0.3rem;
}
.value {
font-size: 0.18rem;
margin-top: 0.04rem;
span {
font-size: 0.12rem !important;
transform: scale(0.8);
margin-top: -0.02rem;
}
}
}
}
.user-item {
margin-top: 0.12rem;
width: calc(50% - 0.12rem);
height: calc(25% - 0.02rem);
top: 25%;
left: 0.1rem;
padding: 0;
& > div {
height: 25%;
width: 100%;
.title {
padding: 0 0.1rem;
display: flex;
align-items: center;
.icon {
width: 0.4rem;
height: 0.4rem;
img {
width: 0.35rem;
height: 0.35rem;
}
}
.name {
font-size: 0.18rem;
}
}
}
.uii {
display: flex;
flex-direction: column;
.gold {
width: 100%;
height: 50% !important;
height: auto;
margin: 0;
font-size: 0.12rem;
padding-right: 0.12rem;
span {
padding: 0;
font-size: 0.16rem !important;
}
}
}
}
.sys-info {
width: calc(50% - 0.12rem);
height: 50%;
bottom: auto;
right: 0.1rem;
top: 0.1rem;
left: auto;
padding: 0.05rem;
font-size: 0.12rem;
.info {
i {
display: none;
}
}
.clear {
top: auto;
bottom: 0.1rem;
right: 0.1rem;
background: #000;
border: 1px solid #ccc;
border-radius: 0.06rem;
padding: 0.02rem 0.04rem;
}
}
.map {
height: calc(50% - 0.24rem);
right: 0.8rem;
left: 0.1rem;
top: auto;
bottom: 0.1rem;
.plan {
height: 0.6rem;
}
.dungeons {
img {
width: 0.35rem;
height: 0.35rem;
}
}
.event-icon {
width: 0.35rem;
height: 0.35rem;
background-size: 100%;
span {
font-size: 0.13rem;
}
}
}
.menu {
display: flex;
flex-direction: column;
left: auto;
right: 0.1rem;
top: 52%;
& > div {
margin: 0.03rem;
img {
width: 0.35rem;
height: 0.35rem;
}
span {
font-size: 0.22rem;
}
}
}
}
.dialog-backpackPanel {
transform: translate(-50%, -50%) scale(0.8);
}
.dialog {
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%);
.item-close {
display: block;
}
.weapon,
.armor,
.ring,
.neck {
& > div {
width: 2.2rem;
font-size: 0.13rem;
.icon {
width: 0.45rem;
height: 0.45rem;
img {
width: 0.4rem;
height: 0.4rem;
}
}
}
padding: 0.06rem;
}
}
}
.drawer-update {
width: 100% !important;
}
.qa {
left: 1.5rem;
width: 0.45rem;
height: 0.5rem;
span {
font-size: 0.12rem !important;
}
img {
width: 0.25rem;
height: 0.25rem;
}
}
.extras {
left: 0.8rem;
width: 0.45rem;
height: 0.5rem;
span {
font-size: 0.12rem !important;
}
img {
width: 0.25rem;
height: 0.25rem;
}
}
.setting {
left: 0.1rem;
width: 0.45rem;
height: 0.5rem;
span {
font-size: 0.12rem !important;
}
img {
width: 0.25rem;
height: 0.25rem;
}
}
}

2
src/components/dialog.vue

@ -170,7 +170,7 @@ onBeforeUnmount(() => { @@ -170,7 +170,7 @@ onBeforeUnmount(() => {
width: 100%;
color: white;
border-bottom: 1px solid #fff;
cursor: pointer;
}
.close {

45
src/components/equip-icon.vue

@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
<template>
<div :class="['icon', equip?.quality.quality]">
<img v-if="src" class="red-flash" :src="src">
<div class="fusion" v-if="equip">
<img v-for="i in equip.fusion" :key="i" class="gotcha" :src="equip_effect_gif.gotcha">
</div>
<span class="equip" v-if="equip">
<img class="img" :src="equips_icon_path + equip.base.icon">
<div class="lv" v-if="equip.lv">lv{{ equip.lv }}</div>
@ -12,7 +15,7 @@ @@ -12,7 +15,7 @@
import { useStore } from "vuex";
import { reactive, onMounted, ref, computed } from "vue";
import { useI18n } from "vue3-i18n";
import { qualitys, equips_icon_path, equip_effect_gif, red_gif, colorful_gif, taigu_gif } from "@/config";
import { equips_icon_path, equip_effect_gif } from "@/config";
const { t } = useI18n();
const { state, commit, dispatch } = useStore();
@ -24,17 +27,6 @@ const src = computed(() => { @@ -24,17 +27,6 @@ const src = computed(() => {
const quality = prop.equip.quality;
const key = quality.extraQuality || quality.quality;
return equip_effect_gif[key];
if (quality.extraQuality) {
return taigu_gif;
}
switch (quality.quality) {
case qualitys[4]:
return red_gif;
case qualitys[5]:
return colorful_gif;
default:
return null;
}
})
const prop = defineProps({
@ -44,13 +36,6 @@ const prop = defineProps({ @@ -44,13 +36,6 @@ const prop = defineProps({
}
})
const iconClass = computed(() => {
if (prop.equip && prop.equip.isUnique()) {
return
}
return "";
})
onMounted(() => { });
</script>
<style lang="scss" scoped>
@ -81,12 +66,23 @@ onMounted(() => { }); @@ -81,12 +66,23 @@ onMounted(() => { });
position: relative;
box-shadow: inset 0 0 7px 2px #a1a1a1b8;
.red-flash {
.red-flash,
.fusion {
position: absolute;
width: 100%;
height: 100%;
}
.fusion {
z-index: 9;
margin-top: -0.3rem;
text-align: left;
img {
height: 0.8rem;
}
}
.img {
left: 15%;
top: 15%;
@ -111,6 +107,15 @@ onMounted(() => { }); @@ -111,6 +107,15 @@ onMounted(() => { });
.icon {
width: 2.5rem;
height: 2.5rem;
.fusion {
margin-top: -0.5rem;
img {
height: 0.6rem;
}
}
}
}
</style>

19
src/components/equip.vue

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
{{ t(equip.type + '.' + equip.base.name + '.0') }}
{{ equip.strengthenLv ? '(+' + equip.strengthenLv + ')' : '' }}
</div>
<img v-for="i in equip.fusion" :key="i" class="gotcha" :src="equip_effect_gif.gotcha">
</div>
<div class='type'>
<div :class="equip.quality.quality">
@ -44,6 +45,9 @@ @@ -44,6 +45,9 @@
<div class="des">{{ t('reRoll.1') }}</div>
</div>
</div>
<div v-if="equip.fusionEntry" class="extraEntry fusionEntry">
{{ t(equip.fusionEntry.type + '.0') }} : {{ equip.fusionEntry.showVal }}({{ equip.fusionEntry.percent }}%)
</div>
<div class="des">
<div>
{{ t(equip.type + '.' + equip.base.name + '.1') }}
@ -58,6 +62,7 @@ import { reactive, onMounted, ref, computed } from "vue"; @@ -58,6 +62,7 @@ import { reactive, onMounted, ref, computed } from "vue";
import { useI18n } from "vue3-i18n";
import EquipIcon from "./equip-icon.vue";
import { strengthenValue, createEquipSkill } from "@/tool"
import { equip_effect_gif } from "@/config";
const { t } = useI18n();
const { state, commit, dispatch } = useStore();
@ -125,6 +130,11 @@ onMounted(() => { }); @@ -125,6 +130,11 @@ onMounted(() => { });
line-height: 3.5rem;
margin-left: 1.2rem;
}
.gotcha {
margin-top: 1.15rem;
height: 1.2rem;
}
}
.type {
@ -179,6 +189,10 @@ onMounted(() => { }); @@ -179,6 +189,10 @@ onMounted(() => { });
text-align: left;
}
}
.fusionEntry {
color: #ffaa11;
}
}
.des {
@ -201,6 +215,11 @@ onMounted(() => { }); @@ -201,6 +215,11 @@ onMounted(() => { });
line-height: 2.5rem;
margin-left: 0;
}
.gotcha {
margin-top: 0.75rem;
height: 1rem;
}
}
.type {

1
src/config/assets.ts

@ -50,6 +50,7 @@ export const equip_effect_gif = { @@ -50,6 +50,7 @@ export const equip_effect_gif = {
colorful: root + '/img/effect/colorful.gif',
yuangu: root + '/img/effect/yuangu.gif',
taigu: root + '/img/effect/taigu.gif',
gotcha: root + '/img/effect/gotcha.png',
};
export const red_gif = root + '/img/red.gif';
export const colorful_gif = root + '/img/colorful.gif';

4
src/config/equips/armor.ts

@ -142,8 +142,8 @@ export const createarmor = (quality, lv, category, extraQuality) => { @@ -142,8 +142,8 @@ export const createarmor = (quality, lv, category, extraQuality) => {
return new Equip(type, lv, qualityBean, base, extraEntry);
};
export const armorExtraEntry = (quality, lv, extraQuality) => {
return createExtraEntry(quality, lv, armorExtraEntrys, coefficient, extraQuality);
export const armorExtraEntry = (quality, lv, extraQuality, type?) => {
return createExtraEntry(coefficient[quality], lv, type ? [type] : armorExtraEntrys, extraQuality);
};
export const armorSamples = createSamples(armorCategorys, armorUniqueCategorys, armorColorfulCategorys, 'armor', coefficient);

5
src/config/equips/base.ts

@ -11,11 +11,10 @@ export const createBase = (quality, lv, category, coefficient, extraQuality) => @@ -11,11 +11,10 @@ export const createBase = (quality, lv, category, coefficient, extraQuality) =>
return new EquipBase(category.name, category.icon, entry, category.skill);
};
export const createExtraEntry = (quality, lv, extraEntrys, coefficient, extraQuality) => {
export const createExtraEntry = (coefficient, lv, extraEntrys, extraQuality) => {
const type = extraEntrys[Math.floor(Math.random() * extraEntrys.length)];
const initor: EntryInitor = entry_initor[type];
const qualityCoefficient = coefficient[quality];
return initor.init(lv, qualityCoefficient, 1, extraQuality);
return initor.init(lv, coefficient, 1, extraQuality);
};
export const createSamples = (categorys: Categorys[], uniqueCategorys: Categorys[], colorfulCategorys: Categorys[], type, coefficient) => {

2
src/config/equips/bean.ts

@ -54,6 +54,8 @@ export class Equip { @@ -54,6 +54,8 @@ export class Equip {
base: EquipBase;
extraEntry: Entry[];
reRoll?: number;
fusion:number = 0;
fusionEntry?:Entry;
constructor(type: string, lv, quality: Quality, base: EquipBase, extraEntry: Entry[]) {
this.type = type;
this.lv = lv;

4
src/config/equips/bracers.ts

@ -130,8 +130,8 @@ export const createbracers = (quality, lv, category, extraQuality): Equip => { @@ -130,8 +130,8 @@ export const createbracers = (quality, lv, category, extraQuality): Equip => {
return new Equip(type, lv, qualityBean, base, extraEntry);
};
export const bracersExtraEntry = (quality, lv, extraQuality) => {
return createExtraEntry(quality, lv, bracersExtraEntrys, coefficient, extraQuality);
export const bracersExtraEntry = (quality, lv, extraQuality, type?) => {
return createExtraEntry(coefficient[quality], lv, type ? [type] : bracersExtraEntrys, extraQuality);
};
export const bracersSamples = createSamples(bracersCategorys, bracersUniqueCategorys, bracersColorfulCategorys, 'bracers', coefficient);

4
src/config/equips/jewelry.ts

@ -143,8 +143,8 @@ export const createjewelry = (quality, lv, category, extraQuality): Equip => { @@ -143,8 +143,8 @@ export const createjewelry = (quality, lv, category, extraQuality): Equip => {
return new Equip(type, lv, qualityBean, base, extraEntry);
};
export const jewelryExtraEntry = (quality, lv, extraQuality) => {
return createExtraEntry(quality, lv, jewelryExtraEntrys, coefficient, extraQuality);
export const jewelryExtraEntry = (quality, lv, extraQuality, type?) => {
return createExtraEntry(coefficient[quality], lv, type ? [type] : jewelryExtraEntrys, extraQuality);
};
export const jewelrySamples = createSamples(jewelryCategorys, jewelryUniqueCategorys, jewelryColorfulCategorys, 'jewelry', coefficient);

14
src/config/equips/neck.ts

@ -61,6 +61,16 @@ export const neckColorfulCategorys: Categorys[] = [ @@ -61,6 +61,16 @@ export const neckColorfulCategorys: Categorys[] = [
'ShaYi'
),
new NeckCategory('longteng', 'neck/龙腾护心镜.png', [{ type: 'hp', valCoefficient: 3 }], 'LongTeng'),
new NeckCategory(
'bianhua',
'neck/最初的彼岸花.png',
[
{ type: 'critDmg', valCoefficient: 0.9 },
{ type: 'atk', valCoefficient: 0.9 },
{ type: 'hp', valCoefficient: 1.2 },
],
'ZhenXi'
),
];
export const neckUniqueCategorys: NeckCategory[] = [
@ -127,8 +137,8 @@ export const createneck = (quality, lv, category, extraQuality) => { @@ -127,8 +137,8 @@ export const createneck = (quality, lv, category, extraQuality) => {
return new Equip(type, lv, qualityBean, base, extraEntry);
};
export const neckExtraEntry = (quality, lv, extraQuality) => {
return createExtraEntry(quality, lv, neckExtraEntrys, coefficient, extraQuality);
export const neckExtraEntry = (quality, lv, extraQuality, type?) => {
return createExtraEntry(coefficient[quality], lv, type ? [type] : neckExtraEntrys, extraQuality);
};
export const neckSamples = createSamples(neckCategorys, neckUniqueCategorys, neckColorfulCategorys, 'neck', coefficient);

4
src/config/equips/pants.ts

@ -124,8 +124,8 @@ export const createpants = (quality, lv, category, extraQuality) => { @@ -124,8 +124,8 @@ export const createpants = (quality, lv, category, extraQuality) => {
return new Equip(type, lv, qualityBean, base, extraEntry);
};
export const pantsExtraEntry = (quality, lv, extraQuality) => {
return createExtraEntry(quality, lv, pantsExtraEntrys, coefficient, extraQuality);
export const pantsExtraEntry = (quality, lv, extraQuality, type?) => {
return createExtraEntry(coefficient[quality], lv, type ? [type] : pantsExtraEntrys, extraQuality);
};
export const pantsSamples = createSamples(pantsCategorys, pantsUniqueCategorys, pantsColorfulCategorys, 'pants', coefficient);

14
src/config/equips/ring.ts

@ -73,6 +73,16 @@ export const ringColorfulCategorys: Categorys[] = [ @@ -73,6 +73,16 @@ export const ringColorfulCategorys: Categorys[] = [
],
'JainYing'
),
new RingCategory(
'jinjiezhi',
'ring/金戒指.png',
[
{ type: 'critDmg', valCoefficient: 1.5 },
{ type: 'crit', valCoefficient: 0.5 },
{ type: 'atk', valCoefficient: 1 },
],
'ShouHui'
),
];
export const ringUniqueCategorys: RingCategory[] = [
@ -133,8 +143,8 @@ export const createring = (quality, lv, category, extraQuality) => { @@ -133,8 +143,8 @@ export const createring = (quality, lv, category, extraQuality) => {
return new Equip(type, lv, qualityBean, base, extraEntry);
};
export const ringExtraEntry = (quality, lv, extraQuality) => {
return createExtraEntry(quality, lv, ringExtraEntrys, coefficient, extraQuality);
export const ringExtraEntry = (quality, lv, extraQuality, type?) => {
return createExtraEntry(coefficient[quality], lv, type ? [type] : ringExtraEntrys, extraQuality);
};
export const ringSamples = createSamples(ringCategorys, ringUniqueCategorys, ringColorfulCategorys, 'ring', coefficient);

4
src/config/equips/shoes.ts

@ -89,8 +89,8 @@ export const createshoes = (quality, lv, category, extraQuality) => { @@ -89,8 +89,8 @@ export const createshoes = (quality, lv, category, extraQuality) => {
return new Equip(type, lv, qualityBean, base, extraEntry);
};
export const shoesExtraEntry = (quality, lv, extraQuality) => {
return createExtraEntry(quality, lv, shoesExtraEntrys, coefficient, extraQuality);
export const shoesExtraEntry = (quality, lv, extraQuality, type?) => {
return createExtraEntry(coefficient[quality], lv, type ? [type] : shoesExtraEntrys, extraQuality);
};
export const shoesSamples = createSamples(shoesCategorys, shoesUniqueCategorys, shoesColorfulCategorys, 'shoes', coefficient);

15
src/config/equips/weapon.ts

@ -129,6 +129,17 @@ export const weaponColorfulCategorys: Categorys[] = [ @@ -129,6 +129,17 @@ export const weaponColorfulCategorys: Categorys[] = [
'LiuYing,SeeRed',
0.9
),
new WeaponCategory(
'yinhelie',
'weapon/银河裂.png',
[
{ type: 'atk', valCoefficient: 1.8 },
{ type: 'crit', valCoefficient: 1.5 },
{ type: 'critDmg', valCoefficient: 1.3 },
],
'HunYuan,LieYinHe',
0.9
),
new WeaponCategory(
'chulian',
'weapon/初恋.png',
@ -231,8 +242,8 @@ export const createweapon = (quality, lv, category, extraQuality) => { @@ -231,8 +242,8 @@ export const createweapon = (quality, lv, category, extraQuality) => {
return new Equip(type, lv, qualityBean, base, extraEntry);
};
export const weaponExtraEntry = (quality, lv, extraQuality) => {
return createExtraEntry(quality, lv, weaponExtraEntrys, coefficient, extraQuality);
export const weaponExtraEntry = (quality, lv, extraQuality, type?) => {
return createExtraEntry(coefficient[quality], lv, type ? [type] : weaponExtraEntrys, extraQuality);
};
export const weaponSamples = createSamples(weaponCategorys, weaponUniqueCategorys, weaponColorfulCategorys, 'weapon', coefficient);

9
src/config/i18n/zh/euips.ts

@ -24,13 +24,13 @@ export const weapon = { @@ -24,13 +24,13 @@ export const weapon = {
shayi: ['杀意', '仇敌,莫让吾听闻汝名。'],
limaoliren: ['狸猫利刃', '比时光还要无情。'],
liuying: ['流萤', '若不困顿於林野,必凄惶於道路。'],
yinhelie: ['银河裂', '天河裂而混元出。'],
chulian: ['初恋', '我的初恋在月亮之上。 ----八戒'],
chengba: ['称霸', '霸者不藏其锋,以天地为鞘。'],
duwu: ['黩武', '若未用够最后一丝力气,如何能甘心。'],
emeng: ['噩梦', '我最近的噩梦,都和一只猴子有关...... ----增长天王'],
heifeng: ['黑风', '这把斧子一直不肯相信它的主人已经死去。'],
shishen: ['弑神', '从斩妖台流落到地府的禁忌之物,慎用。'],
jlys: ['九灵·元圣', '当坐骑总比没命了强。'],
llzx: ['冷龙之心', '长九尺三寸,苍青之气盘绕九十三匝。'],
liubuxiang: ['六不像', '汝若身披业火,当一念不起,六欲尽灭。'],
longxian: ['龙衔', '天之西北有幽冥无日之国,有龙衔烛而照之也。'],
@ -39,7 +39,6 @@ export const weapon = { @@ -39,7 +39,6 @@ export const weapon = {
wuzhe: ['无遮', '知识自境之心。'],
wuqi: ['武气', '武曲星君有武器十八般,皆太乙出品。'],
yanmo: ['炎魔', '传说炎魔是火焰山城最后的引路人。'],
yinhelie: ['银河裂', '天河裂而混元出。'],
zhangsan: ['丈三', '杀一是罪,屠万为雄。'],
creation: ['创世亡命剑', '只有被选中的勇士才能唤醒它真正的力量。'],
nameless: ['无名剑', '没有人知道它的来历。'],
@ -101,6 +100,7 @@ export const neck = { @@ -101,6 +100,7 @@ export const neck = {
xuenu: ['血怒', '我们都曾把愤怒埋藏在鲜血里。'],
guiyan: ['鬼眼', '多少楼台平山演,鬼使飞阁绿林空。'],
longteng: ['龙腾护心镜', '腾龙即出,四海来朝。'],
bianhua: ['最初的彼岸花', '三千年生叶,叶落始开花。三千年开花,花谢始叶生。'],
fannao: ['百八烦恼珠', '求人不如求己。'],
zhuxian: ['诛仙', '原来,神的身体流动的血,都是冷的。'],
fodengyou: ['佛灯油', '听说灵山永寂,灯影不摇,我若去了,便叫它风起云动。 ----黄风大圣'],
@ -112,7 +112,6 @@ export const neck = { @@ -112,7 +112,6 @@ export const neck = {
fouzhu: ['十八念佛珠', '别人念佛是为了求如来保佑,如来念佛又是为了什么。'],
wuxinggui: ['太乙神器 五行圭', '太乙出品,必属精品。'],
zhongsheng: ['众生醉', '美酒斟杯莫思量,烦丝一甩九霄扬。'],
bianhua: ['最初的彼岸花', '三千年生叶,叶落始开花。三千年开花,花谢始叶生。'],
demonSlayer: ['十字旅团降魔项链', '十字旅团降魔项链'],
darkDragon: ['进阶黑暗龙王项链', '进阶黑暗龙王项链'],
@ -132,6 +131,7 @@ export const ring = { @@ -132,6 +131,7 @@ export const ring = {
hanba: ['旱魃', '国师与旱魃斗法七日,始有甘霖降车迟国。'],
yaozuzhili: ['妖族之力', '妖王的荣耀。'],
zuanjie: ['黑白钻戒', '钻石不是透明的吗?'],
jinjiezhi: ['金戒指', '这下你应该满意了吧!'],
siyan: ['四眼', '我花了十万年才长出一只眼睛。'],
taiyang: ['太阳真火戒', '这里面有太阳的光辉。'],
taiyin: ['太阴紫电戒', '这里面有月亮的锋芒。'],
@ -146,7 +146,6 @@ export const ring = { @@ -146,7 +146,6 @@ export const ring = {
cike: ['刺客', '最强的刺客总是无名。'],
guichan: ['鬼缠', '小鬼难缠。'],
guigu: ['鬼骨戒', '世道酆都阴城险,我觉弹指一笑间。'],
jinjiezhi: ['金戒指', '这下你应该满意了吧!'],
wangyue: ['望月', '犀牛望月,其影于角。燃其犀角,可见冥界诸灵。'],
wumingjie: ['无名戒', '某个在孽镜台被吃掉的倒霉鬼的遗物。'],
death: ['死神名片戒指', '死神名片戒指'],
@ -167,7 +166,7 @@ export const jewelry = { @@ -167,7 +166,7 @@ export const jewelry = {
shuzhuang: ['梳妆镜', '都上来,一个个仔细看打! ----琵琶精'],
liulipan: ['琉璃盘', '盘底书:凌虚子制。'],
ghdp: ['勾魂夺魂', '神鬼游舍,摄魂夺魄。'],
youerhuan: ['白骨夫人的右耳环', '你一定以为还有左耳环,这个真没有。 ----白骨夫人'],
youerhuan: ['右耳环', '你一定以为还有左耳环,这个真没有。 ----白骨夫人'],
jingboyu: ['金钵盂', '大众休言,妖精未走,见在我这钵盂之下。 ----如来'],
zijingboyu: ['紫金钵盂', '金饭碗'],
hanjing: ['寒晶佩', '蜡烛红的珊瑚枝,其色芬然如火。'],

44
src/config/i18n/zh/index.ts

@ -9,9 +9,6 @@ export default class Zh { @@ -9,9 +9,6 @@ export default class Zh {
welcome = ['欢迎你勇士,点击地图上的副本开始战斗。', '界面左上角菜单可以打开世界副本地图。'];
sys = '系统';
loadEmpty = '未读取到存档!';
loadError = '存档坏了!';
loadSuccess = '读取存档成功';
sellLocked = '装备已锁定,请先解锁再出售';
sellEquip = '出售装备获得金币';
stFinish = '装备已经达到目标强化等级。';
@ -81,11 +78,24 @@ export default class Zh { @@ -81,11 +78,24 @@ export default class Zh {
'点击任意词条花费金币重铸装备所有词条',
'重铸时词条颜色与百分比值显示了该词条的等级',
'重铸后可选择保留原词条或新词条',
'自动重铸的费用是手动重铸的两倍',
'自动重铸的费用是手动重铸的两1.5倍',
],
action: ['点击花费${0}金币重铸', '恢复原词条', '保留新词条'],
atuo: ['重铸目标', '自动重铸', '自动重铸中', '中断自动重铸'],
};
fusion = {
title: '融合',
need: '花费金币',
desc: [
'融合说明',
'消耗同名太古装备可进行装备融合',
'一星太古可消耗任意材料重置融合属性类型',
'一星以上太古可消耗同星且融合属性类型相同的材料升星,最多升为三星',
'融合属性品质为一星:神话,二星:远古,三星:太古',
],
confirm: ['融合后作为材料的装备将会消失,确认要融合吗?', '确定', '算了'],
empty: '无融合属性',
};
lock = '锁定';
unlock = '解锁';
sell = '出售';
@ -162,17 +172,21 @@ export default class Zh { @@ -162,17 +172,21 @@ export default class Zh {
addPoints = '左键加+1,右键+10';
subtractPoints = '左键-1,右键-10';
saveGame = ['保存游戏(Ctrl+S)', '每5分钟会自动保存游戏一次', '游戏进度已经保存了。'];
archive = ['存档管理(A)', '导入存档前请将存档内容粘贴到输入框内'];
copyArchive = ['复制存档', '已经复制存档了,建议保存到备忘录', '复制存档失败', '复制旧存档'];
pasteArchive = ['粘贴存档', '粘贴存档内容到输入框成功', '粘贴失败'];
cleanArchive = ['删除存档'];
uploadArchive = '上传存档';
downArchive = '下载存档';
importArchive = ['导入', '导入存档成功,继续游戏吧!', '导入存档失败', '存档版本已过期,无法导入!'];
experiential = ['导入体验存档成功,体验时间${0}分钟。', '体验存档无法保存!', '体验时间已过,自动读取本地存档。'];
music = ['播放或禁音背景音乐(M)'];
archive = {
empty: '未读取到存档!',
error: '存档坏了!',
load: '读取存档成功',
menu: ['存档管理(A)', '导入存档前请将存档内容粘贴到输入框内'],
copy: ['复制存档', '已经复制存档了,建议保存到备忘录', '复制存档失败', '复制旧存档'],
paste: ['粘贴存档', '粘贴存档内容到输入框成功', '粘贴失败'],
clean: ['删除存档'],
upload: '上传存档',
down: '下载存档',
import: ['导入', '导入存档成功,继续游戏吧!', '导入存档失败', '存档版本已过期,无法导入!'],
experiential: ['导入体验存档成功,体验时间${0}分钟。', '体验存档无法保存!', '体验时间已过,自动读取本地存档。'],
save: ['保存游戏(Ctrl+S)', '每5分钟会自动保存游戏一次', '游戏进度已经保存了。', '保存游戏失败!'],
check: ['存档存在更新,保存游戏10分钟内无法回档!'],
};
illustrated = ['装备图鉴(I)'];

1
src/config/i18n/zh/setting.ts

@ -2,3 +2,4 @@ export const title = '系统设置(ESC)'; @@ -2,3 +2,4 @@ export const title = '系统设置(ESC)';
export const action = ['保存设置', '取消'];
export const music = ['背景音乐', '完全关闭', '最小音量', '正常音量'];
export const battle = ['战斗日志', '显示', '隐藏'];
export const speed = ['功能加速', '正常', '倍'];

4
src/config/i18n/zh/skills.ts

@ -30,6 +30,8 @@ export const liuying = [ @@ -30,6 +30,8 @@ export const liuying = [
];
export const seeRed = ['见红', '对目标施加${0}层流血,持续${1}回合。', '冷却${0}回合。'];
export const shilian = ['失恋', '受到的伤害增加${0}%。'];
export const hunyuan = ['混元', '获得${0}%攻击加成。'];
export const lieyinhe = ['裂银河', '一剑裂银河。无视目标护甲进行攻击,冷却${0}回合。'];
export const bhxdjc = [
'百花羞的矜持',
@ -57,6 +59,7 @@ export const shayi = [ @@ -57,6 +59,7 @@ export const shayi = [
];
export const numu = ['怒目', '被攻击时提升${0}%基础攻击力,最多叠加${1}层。', '增加一层怒目,当前${0}层'];
export const longteng = ['龙腾护佑', '获得${0}%伤害减免,被攻击时有${1}%概率获得${2}%生命上限的护盾。', '触发龙腾护佑,获得${0}点护盾。'];
export const zhenxi = ['珍稀'];
export const SLWX = ['森罗万象', '增加${0}%攻击加成、伤害加成、暴击率、暴击伤害。'];
export const jinggangzhuo = ['金刚琢', '攻击时有${0}%几率使目标进入缴械状态${1}回合。', '触发金刚镯,目标缴械${0}回合'];
@ -70,6 +73,7 @@ export const tongjuefanji = [ @@ -70,6 +73,7 @@ export const tongjuefanji = [
'${0}被控制,无法释放技能。',
];
export const jianying = ['坚硬', '获得${0}%伤害减免。'];
export const shouhui = ['受贿'];
export const fate = ['化缘', '副本掉落金币奖励提高${0}%。'];
export const vampire = ['汲血', '生命偷取${0}%。', '触发汲血,偷取${0}点生命'];

13
src/config/skill/buff.ts

@ -141,6 +141,15 @@ export class BlocPercentBuff extends PercentAttackedBuff { @@ -141,6 +141,15 @@ export class BlocPercentBuff extends PercentAttackedBuff {
owner.extraAttr.bloc += Math.ceil((owner.attr.bloc * this.percent) / 100);
}
}
//承受伤害增加或减少BUFF
export class MoreBearBuff extends PercentAttackedBuff {
desc(): string {
return replace(t('skill.defbuff.2'), [this.percent * this.layer]);
}
takeEffect(owner: BattleRole): void {
owner.moreBear = callDmgPercent(owner.moreBear, this.percent);
}
}
//控制异常
export class ControlBuff extends AttackBuff {
constructor(name: string, last: number) {
@ -197,13 +206,13 @@ export class LiuXue extends AttackBuff { @@ -197,13 +206,13 @@ export class LiuXue extends AttackBuff {
}
takeEffect(owner: BattleRole): void {
const reducPercent = callReducPercent(owner.attr.def + owner.extraAttr.def, owner.attr.lv); //目标防御提供的减伤比例
const dmg = Math.ceil(owner.attr.curHp * (this.percent / 100) * this.layer * (1 - reducPercent));
const dmg = Math.ceil(owner.attr.curHp * (this.percent / 100) * this.layer * (1 - reducPercent) * (1 + owner.moreBear / 100));
owner.addHp(-1 * dmg);
owner.debuffLog(replace(t('skill.liuxue.1'), [this.layer, t(owner.type), dmg]));
}
}
//感电
export class GanDian extends DmgReducBuff {
export class GanDian extends MoreBearBuff {
constructor(last: number) {
super('gandian', -50, last);
}

6
src/config/skill/jewelry.ts

@ -11,7 +11,7 @@ export class Fate extends GainsSkill { @@ -11,7 +11,7 @@ export class Fate extends GainsSkill {
return replace(t('skill.fate.1'), [this.percent]);
}
afterBattle(owner: BattleRole, target: BattleRole): void {
target.attr.coins = Math.round(target.attr.coins * (1 + this.percent / 100));
target.extraAttr.coins += Math.round(target.attr.coins * (this.percent / 100));
}
}
//1%生命偷取
@ -47,7 +47,7 @@ export class CritFear extends SufPassiveSkill { @@ -47,7 +47,7 @@ export class CritFear extends SufPassiveSkill {
}
//琉璃盘
export class Liulipan extends Attack {
order: number = 10;
order: number = 99;
lv?: number;
name: string = 'liulipan';
atk: number = 50;
@ -74,7 +74,7 @@ export class JHSY extends CounterSkill { @@ -74,7 +74,7 @@ export class JHSY extends CounterSkill {
takeEffect(owner: BattleRole, target: BattleRole): void {
// const reducPercent = callReducPercent(owner.attr.def + owner.extraAttr.def, owner.attr.lv); //目标防御提供的减伤比例
// const reflected = Math.ceil(((target.baseDmg * this.percent) / 100) * (1 - reducPercent));
const reflected = Math.ceil((target.baseDmg * this.percent) / 100);
const reflected = Math.ceil(target.baseDmg * (this.percent / 100) * (1 + target.moreBear / 100));
target.addHp(-1 * reflected);
const log = replace(t('skill.JHSY.2'), [t(owner.type), reflected]);
owner.extraDmgLog(log);

6
src/config/skill/neck.ts

@ -2,6 +2,7 @@ import { SufPassiveSkill, PrePassiveSkill, CounterSkill } from './base'; @@ -2,6 +2,7 @@ import { SufPassiveSkill, PrePassiveSkill, CounterSkill } from './base';
import { createt } from '../i18n';
import { BattleRole, replace } from '@/tool';
import { BaseAtkPercentBuff, DmgReducBuff } from './buff';
import { Fate } from './jewelry';
const st = createt('skill.');
const t = createt('');
@ -132,3 +133,8 @@ export class XingYunShuZi extends SufPassiveSkill { @@ -132,3 +133,8 @@ export class XingYunShuZi extends SufPassiveSkill {
owner.extraDmgLog(replace(st('xingyunshuzi.3'), [t(target.type), dmg]));
}
}
//珍稀
export class ZhenXi extends Fate {
percent = 20;
name: string = 'zhenxi';
}

4
src/config/skill/pants.ts

@ -37,7 +37,7 @@ export class FuRenBiHu extends PrePassiveSkill { @@ -37,7 +37,7 @@ export class FuRenBiHu extends PrePassiveSkill {
//灵感
export class LingGan extends StartPassiveSkill {
name: string = 'linggan';
percent: number = 1;
percent: number = 2;
desc(): string {
return replace(t('skill.linggan.1'), [this.percent]);
}
@ -58,7 +58,7 @@ export class WanKang extends CounterSkill { @@ -58,7 +58,7 @@ export class WanKang extends CounterSkill {
return target.dmg > 0;
}
takeEffect(owner: BattleRole, target: BattleRole): void {
let reflected = Math.ceil((target.baseDmg * this.percent) / 100);
let reflected = Math.ceil(target.baseDmg * (this.percent / 100));
const max = Math.ceil((owner.attr.hp * this.hpPercnet) / 100);
reflected > max && (reflected = max);
target.addHp(-1 * reflected);

8
src/config/skill/ring.ts

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
import { SufPassiveSkill, PrePassiveSkill, PassiveSkill, CounterSkill, StartPassiveSkill } from './base';
import { SufPassiveSkill, PrePassiveSkill, PassiveSkill, CounterSkill, StartPassiveSkill, GainsSkill } from './base';
import i18n from '../i18n';
import { BattleRole, callDmgPercent, replace } from '@/tool';
import { ControlBuff, CritDmgBuff, CritDmgReducBuff, DmgReducBuff } from './buff';
import { Fate } from './jewelry';
const { t } = i18n;
//森罗万象
@ -133,3 +134,8 @@ export class JainYing extends StartPassiveSkill { @@ -133,3 +134,8 @@ export class JainYing extends StartPassiveSkill {
owner.putBuff(new DmgReducBuff(this.name, this.dmgReduc, 9999));
}
}
//受贿
export class ShouHui extends Fate {
percent = 30;
name: string = 'shouhui';
}

70
src/config/skill/weapon.ts

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
import { ActionSkill, Attack, Control, PrePassiveSkill, StartPassiveSkill, SufPassiveSkill } from './base';
import { createt } from '../i18n';
import { replace, BattleRole } from '@/tool';
import { ControlBuff, CritDmgBuff, DmgPercentBuff, DmgReducBuff, GanDian, KuiLan, LiuXue } from './buff';
import { AtkPercentBuff, ControlBuff, CritDmgBuff, DmgPercentBuff, DmgReducBuff, GanDian, KuiLan, LiuXue } from './buff';
const t = createt('');
const st = createt('skill.');
@ -33,22 +33,6 @@ export class QiuAi extends Attack { @@ -33,22 +33,6 @@ export class QiuAi extends Attack {
return replace(st('qiuai.1'), [this.percent]);
}
}
//见红
export class SeeRed extends ActionSkill {
name: string = 'seeRed';
layer: number = 5;
cd: number = 5;
last: number = 5;
desc(): string {
return replace(st('seeRed.1'), [this.layer, this.last]) + replace(st('seeRed.2'), [this.cd]);
}
use(owner: BattleRole, target: BattleRole): void {
owner.skillPercent = 0;
const liuxue = new LiuXue(this.layer, this.last);
target.putBuff(liuxue);
owner.extraDmgLog(replace(st('user'), [t(owner.type), st(this.name + '.0')]) + replace(st('seeRed.1'), [this.layer, this.last]));
}
}
//鳍刺
export class QiCi extends SufPassiveSkill {
name: string = 'qici';
@ -135,8 +119,8 @@ export class ShiJiuCha extends SufPassiveSkill { @@ -135,8 +119,8 @@ export class ShiJiuCha extends SufPassiveSkill {
//剑气动四方
export class JianQiDongSiFang extends StartPassiveSkill {
name: string = 'jianqidongsifang';
dmgPercent: number = 50;
dmgReduc: number = -20;
dmgPercent: number = 100;
dmgReduc: number = -40;
desc(): string {
return replace(st('jianqidongsifang.1'), [this.dmgPercent, this.dmgReduc * -1]);
}
@ -153,7 +137,7 @@ export class BaoFengXue extends Control { @@ -153,7 +137,7 @@ export class BaoFengXue extends Control {
cd: number = 10;
last: number = 3;
rate: number = 100;
bossRate: number = 65;
bossRate: number = 100;
desc(): string {
return replace(st('baofengxue.1'), [this.last, this.cd, this.bossRate]);
}
@ -162,7 +146,7 @@ export class BaoFengXue extends Control { @@ -162,7 +146,7 @@ export class BaoFengXue extends Control {
// 波动杀意
export class BoDongShaYi extends PrePassiveSkill {
name: string = 'bodongshayi';
precent: number = 10;
precent: number = 20;
maxLayer: number = 15;
desc(): string {
return replace(st('bodongshayi.1'), [this.precent, this.maxLayer]);
@ -240,7 +224,7 @@ export class LiuYing extends SufPassiveSkill { @@ -240,7 +224,7 @@ export class LiuYing extends SufPassiveSkill {
}
takeEffect(owner: BattleRole, target: BattleRole): void {
this.curLayer += this.layer;
owner.extraDmgLog(replace(st('liuying.2'), [t(owner.type), this.layer, this.maxLayer, this.curLayer]));
owner.extraDmgLog(replace(st('liuying.2'), [t(owner.type), this.layer, this.curLayer]));
if (this.curLayer >= this.maxLayer) {
const additional = Math.ceil((owner.atk * this.percent) / 100);
target.addHp(-1 * additional);
@ -251,6 +235,22 @@ export class LiuYing extends SufPassiveSkill { @@ -251,6 +235,22 @@ export class LiuYing extends SufPassiveSkill {
}
}
}
//见红
export class SeeRed extends ActionSkill {
name: string = 'seeRed';
layer: number = 5;
cd: number = 5;
last: number = 6;
desc(): string {
return replace(st('seeRed.1'), [this.layer, this.last]) + replace(st('seeRed.2'), [this.cd]);
}
use(owner: BattleRole, target: BattleRole): void {
owner.skillPercent = 0;
const liuxue = new LiuXue(this.layer, this.last);
target.putBuff(liuxue);
owner.extraDmgLog(replace(st('user'), [t(owner.type), st(this.name + '.0')]) + replace(st('seeRed.1'), [this.layer, this.last]));
}
}
//失恋
export class ShiLian extends StartPassiveSkill {
name: string = 'shilian';
@ -263,3 +263,29 @@ export class ShiLian extends StartPassiveSkill { @@ -263,3 +263,29 @@ export class ShiLian extends StartPassiveSkill {
owner.putBuff(shilian);
}
}
//混元
export class HunYuan extends StartPassiveSkill {
name: string = 'hunyuan';
atkPercent: number = 150;
desc(): string {
return replace(st('hunyuan.1'), [this.atkPercent]);
}
takeEffect(owner: BattleRole, target: BattleRole): void {
const hunyuan = new AtkPercentBuff(this.name, this.atkPercent, 9999);
owner.putBuff(hunyuan);
}
}
//裂银河
export class LieYinHe extends Attack {
order: number = 12;
name: string = 'lieyinhe';
cd: number = 10;
desc(): string {
return replace(st('lieyinhe.1'), [this.cd]);
}
use(owner: BattleRole, target: BattleRole): void {
target.extraAttr.def = -1 * target.attr.def;
super.use(owner, target);
}
}

1
src/main.ts

@ -3,6 +3,7 @@ import App from './App.vue'; @@ -3,6 +3,7 @@ import App from './App.vue';
import { router, i18n } from './config';
import store from './store';
import './assets/css/base.scss';
import './assets/css/base-768.scss';
const app = createApp(App);

12
src/store/action.ts

@ -70,8 +70,9 @@ export const saveGame = ({ state, commit }) => { @@ -70,8 +70,9 @@ export const saveGame = ({ state, commit }) => {
if (state.experiential) {
commit('set_sys_info', { msg: t('experiential.1'), type: 'warning' });
} else {
saveArchive(state);
commit('set_sys_info', { msg: t('saveGame.2'), type: 'win' });
saveArchive(state).then((msg) => {
commit('set_sys_info', msg);
});
}
};
@ -86,10 +87,11 @@ export const loadGame = ({ commit }, data?) => { @@ -86,10 +87,11 @@ export const loadGame = ({ commit }, data?) => {
};
const loadArchive = (commit, data) => {
if (!data) {
commit('set_sys_info', { msg: t('loadEmpty'), type: 'warning' });
commit('set_sys_info', { msg: t('archive.empty'), type: 'warning' });
} else if (data == 'undfind') {
commit('set_sys_info', { msg: t('loadError'), type: 'warning' });
commit('set_sys_info', { msg: t('archive.error'), type: 'warning' });
} else {
commit('set_archive_flag', data.flag);
commit('set_experiential', data.experiential);
commit('set_player_equips', data.equips);
commit('set_player_layer', data.layer || 1);
@ -99,7 +101,7 @@ const loadArchive = (commit, data) => { @@ -99,7 +101,7 @@ const loadArchive = (commit, data) => {
commit('set_shop', data.shop);
commit('set_points', data.points);
commit('set_player_lv', data.lv || 1);
commit('set_sys_info', { msg: t('loadSuccess'), type: 'win' });
commit('set_sys_info', { msg: t('archive.load'), type: 'win' });
}
commit('call_player_attribute');
};

3
src/store/mutation.ts

@ -127,3 +127,6 @@ export const add_player_curhp = (state, hp) => { @@ -127,3 +127,6 @@ export const add_player_curhp = (state, hp) => {
export const set_experiential = (state, data) => {
state.experiential = data || false;
};
export const set_archive_flag = (state, data) => {
data && (state.archiveFlag = data);
};

7
src/store/state.ts

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
import { i18n, Player, Points, BaseAttribute } from '@/config';
import { uuid } from '@/tool';
const { t } = i18n;
@ -7,7 +8,13 @@ export default { @@ -7,7 +8,13 @@ export default {
{ type: 'win', msg: t('welcome.0') },
{ type: 'win', msg: t('welcome.1') },
],
archiveFlag: {
id: uuid(),
seq: 0,
time: 0,
},
battleLog: 1, //是否显示战斗日志
speed: 1, //游戏加速
mobile: window.innerWidth < 768,
curMenu: null,
equipTip: {

56
src/tool/archive.ts

@ -1,8 +1,10 @@ @@ -1,8 +1,10 @@
import { Equip, Player, Points } from '@/config';
import { getFromStore, insertToStore, store_name_archive } from './IndexedDB';
import { uuid } from './random';
import { createt } from '@/config/i18n';
export const archive_version = '1.0';
const archive_version_strengthen = '1.0_flag';
const at = createt('archive.');
export class GameArchive {
version: String;
@ -14,41 +16,51 @@ export class GameArchive { @@ -14,41 +16,51 @@ export class GameArchive {
autoSell: string[];
shop: any[];
points: Points;
flag;
constructor(player: Player, grid: any[], autoSell: any[], shop: any[], points: Points) {
constructor(state) {
this.version = archive_version;
const player = state.playerAttribute;
this.equips = [player.weapon, player.armor, player.ring, player.neck, player.jewelry, player.pants, player.shoes, player.bracers];
this.lv = player.lv;
this.layer = player.layer;
this.coins = player.coins;
this.grid = grid;
this.autoSell = autoSell;
this.shop = shop;
this.points = points;
this.grid = state.grid;
this.autoSell = state.autoSell;
this.shop = state.shop;
this.points = state.points;
this.flag = state.archiveFlag;
}
}
export const saveArchive = (state) => {
const archive = new GameArchive(state.playerAttribute, state.grid, state.autoSell, state.shop, state.points);
getFromStore(store_name_archive, archive_version_strengthen).then((flag: any) => {
export const checkArchive = (flag) => {
return new Promise((resolve, reject) => {
getArchive().then((rsp: any) => {
const flago = rsp && rsp.flag;
const time = new Date().getTime();
if (!flag || !flag.time || flag.time + 10 * 60 * 1000 < time) {
flag = { version: archive_version_strengthen, time: time };
}
const equips = new Array();
Array.prototype.push.apply(equips, archive.equips);
Array.prototype.push.apply(equips, archive.grid);
equips.forEach((equip) => {
if (!equip) return;
if (equip.strengthenLv > 0 && !equip.id) {
equip.id = uuid();
if (flago && flago.id == flag.id && flag.seq < flago.seq && flago.time + 10 * 60 * 1000 > time) {
resolve(false);
} else {
resolve(true);
}
if (equip.id) {
flag[equip.id] = equip.strengthenLv;
});
});
};
export const saveArchive = (state) => {
return new Promise((resolve, reject) => {
checkArchive(state.archiveFlag).then((rsp) => {
if (rsp) {
state.archiveFlag.time = new Date().getTime();
state.archiveFlag.seq++;
const archive = new GameArchive(state);
insertToStore(store_name_archive, archive).then((rsp) => {
resolve({ msg: at(rsp ? 'save.2' : 'save.3'), type: 'win' });
});
} else {
resolve({ msg: at('check.0'), type: 'warning' });
}
});
insertToStore(store_name_archive, archive);
insertToStore(store_name_archive, flag);
});
};

6
src/tool/caller/attribute.ts

@ -15,8 +15,10 @@ export const callPlayerAttribute = (player: Player, base: any) => { @@ -15,8 +15,10 @@ export const callPlayerAttribute = (player: Player, base: any) => {
const attribute: Attribute = new Attribute(base);
const entry = new Array();
equips.forEach((equip) => {
equip && Array.prototype.push.apply(entry, equip.extraEntry);
equip && Array.prototype.push.apply(entry, strengthenEntry(equip));
if (!equip) return;
Array.prototype.push.apply(entry, equip.extraEntry);
Array.prototype.push.apply(entry, strengthenEntry(equip));
equip.fusionEntry && entry.push(equip.fusionEntry);
});
entry.forEach((item) => {

6
src/tool/caller/battle.ts

@ -20,6 +20,7 @@ export class BattleRole { @@ -20,6 +20,7 @@ export class BattleRole {
extraAttr: Attribute = new Attribute();
shield: number = 0;
skillPercent: number = 100;
moreBear: number = 0;
constructor(attr: Attribute, commit, type: string) {
this.attr = attr;
@ -40,6 +41,7 @@ export class BattleRole { @@ -40,6 +41,7 @@ export class BattleRole {
this.extraAttr.critDmg = 0;
this.shield = Math.ceil(this.shield * 0.9);
this.skillPercent = 0;
this.moreBear = 0;
};
addSkill = (skillName, lv?) => {
@ -139,7 +141,7 @@ export class BattleRole { @@ -139,7 +141,7 @@ export class BattleRole {
skill.afterBattle(this, target);
});
const equips = randonBootyEquip(target.attr);
const coins = target.attr.coins;
const coins = target.attr.coins + target.extraAttr.coins;
return { equips: equips, coins: coins };
};
@ -171,7 +173,7 @@ export class BattleRole { @@ -171,7 +173,7 @@ export class BattleRole {
}
const reducPercent = callReducPercent(target.attr.def + target.extraAttr.def, target.attr.lv); //目标防御提供的减伤比例
const dmgReduc = callDmgReduc(target.attr.dmgReduc, target.extraAttr.dmgReduc); //目标伤害减免
const takeDmgPercent = (1 - reducPercent) * (1 - dmgReduc / 100); //目标承受伤害比例
const takeDmgPercent = (1 - reducPercent) * (1 - dmgReduc / 100) * (1 + this.moreBear / 100); //目标承受伤害比例
const bloc = target.attr.bloc + target.extraAttr.bloc; //目标格挡值
const dmg = Math.ceil(this.baseDmg * takeDmgPercent - bloc); //目标承受伤害
this.dmg = dmg < 1 ? 1 : dmg;

7
src/tool/formatter.ts

@ -1,8 +1,11 @@ @@ -1,8 +1,11 @@
export const formartNum = (num) => {
if (num > 100000000) {
if (num >= 100000000000) {
return (num / 1000000000).toFixed(1) + 'b';
}
if (num >= 100000000) {
return (num / 1000000).toFixed(1) + 'm';
}
if (num > 100000) {
if (num >= 100000) {
return (num / 1000).toFixed(1) + 'k';
}
return num;

55
src/views/archive.vue

@ -1,21 +1,21 @@ @@ -1,21 +1,21 @@
<template>
<Tooltip :infos="[t('archive.0')]" width="12rem">
<Tooltip :infos="[at('menu.0')]" width="12rem">
<img class="menu-img" :src="menu_icons.exportGame" @click="showMenu">
</Tooltip>
<Dialog :title="t('archive.0')" v-model="showArchive" top="4rem" left='8%' @close="state.curMenu = null">
<Dialog :title="at('menu.0')" v-model="showArchive" top="4rem" left='8%' @close="state.curMenu = null">
<div class="archive">
<span class="tip">* {{ t('archive.1') }}</span>
<span class="tip">* {{ at('menu.1') }}</span>
<textarea class="textarea" v-model="archive"></textarea>
</div>
<div class="footer">
<button class="button" @click="copyArchive(archive)">{{ t('copyArchive.0') }}</button>
<button class="button" @click="pasteArchive">{{ t('pasteArchive.0') }}</button>
<button class="button" @click="importArchive">{{ t('importArchive.0') }}</button>
<button class="button" @click="copyArchive(archive)">{{ at('copy.0') }}</button>
<button class="button" @click="pasteArchive">{{ at('paste.0') }}</button>
<button class="button" @click="importArchive">{{ at('import.0') }}</button>
</div>
<div class="footer">
<button class="button" @click="uploadArchive">{{ t('uploadArchive') }}</button>
<button class="button" @click="downArchive">{{ t('downArchive') }}</button>
<button class="button" @click="uploadArchive">{{ at('upload') }}</button>
<button class="button" @click="downArchive">{{ at('down') }}</button>
</div>
</Dialog>
@ -27,10 +27,12 @@ import { computed, onMounted, ref, onBeforeUnmount } from "vue"; @@ -27,10 +27,12 @@ import { computed, onMounted, ref, onBeforeUnmount } from "vue";
import { useI18n } from "vue3-i18n";
import { Tooltip, Dialog } from "@/components"
import { menu_icons } from "@/config";
import { getArchive, AES_CBC_ENCRYPT, AES_CBC_DECRYPT, checkImportArchive, saveArchive, replace, archive_version, MD5 } from "@/tool";
import { getArchive, AES_CBC_ENCRYPT, AES_CBC_DECRYPT, checkImportArchive, saveArchive, replace, archive_version, MD5, checkArchive } from "@/tool";
import * as API from "@/api";
import { createt } from "@/config/i18n";
const { t } = useI18n();
// const { t } = useI18n();
const at = createt('archive.');
const { state, commit, dispatch } = useStore();
const showArchive = computed(() => {
return state.curMenu == 'archive';
@ -62,10 +64,10 @@ const showMenu = () => { @@ -62,10 +64,10 @@ const showMenu = () => {
const copyArchive = (archive) => {
if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText(archive).then(() => {
commit('set_sys_info', { msg: t('copyArchive.1'), type: 'win' })
commit('set_sys_info', { msg: at('copy.1'), type: 'win' })
showMenu();
}).catch(() => {
commit('set_sys_info', { msg: t('copyArchive.2'), type: 'waring' })
commit('set_sys_info', { msg: at('copy.2'), type: 'waring' })
});
} else {
const textField = document.createElement("textarea");
@ -74,7 +76,7 @@ const copyArchive = (archive) => { @@ -74,7 +76,7 @@ const copyArchive = (archive) => {
textField.select();
document.execCommand("copy");
textField.remove();
commit('set_sys_info', { msg: t('copyArchive.1'), type: 'win' })
commit('set_sys_info', { msg: at('copy.1'), type: 'win' })
showMenu();
}
}
@ -112,10 +114,10 @@ const pasteArchive = () => { @@ -112,10 +114,10 @@ const pasteArchive = () => {
if (result.state === 'granted') {
navigator.clipboard.readText().then(text => {
archive.value = text;
commit('set_sys_info', { msg: t('pasteArchive.1'), type: 'win' })
commit('set_sys_info', { msg: at('paste.1'), type: 'win' })
});
} else {
commit('set_sys_info', { msg: t('pasteArchive.2'), type: 'waring' })
commit('set_sys_info', { msg: at('paste.2'), type: 'waring' })
}
});
}
@ -124,29 +126,40 @@ const importArchive = async () => { @@ -124,29 +126,40 @@ const importArchive = async () => {
try {
const data = JSON.parse(AES_CBC_DECRYPT(archive.value, key));
if (!data || data == 'undfind') {
commit('set_sys_info', { msg: t('loadEmpty'), type: 'warning' });
commit('set_sys_info', { msg: at('empty'), type: 'warning' });
}
if (data.version != archive_version) {
commit('set_sys_info', { msg: t('importArchive.3'), type: 'warning' });
commit('set_sys_info', { msg: at('import.3'), type: 'warning' });
return;
}
await checkImportArchive(data);
const flag = data.flag || state.archiveFlag;
console.log(flag);
checkArchive(flag).then(async rsp => {
if (!rsp) {
commit('set_sys_info', { msg: at('check.0'), type: 'warning' });
return;
} else {
await dispatch('loadGame', data);
if (state.experiential) {
commit('set_sys_info', { msg: replace(t('experiential.0'), [data.experientialTime]), type: 'win' });
commit('set_sys_info', { msg: replace(at('experiential.0'), [data.experientialTime]), type: 'win' });
const time = data.experientialTime || 10;
clearTimeout(timeOut);
timeOut = setTimeout(() => {
commit('set_sys_info', { msg: replace(t('experiential.2'), [data.experientialTime]), type: 'warning' });
commit('set_sys_info', { msg: replace(at('experiential.2'), [data.experientialTime]), type: 'warning' });
dispatch('loadGame');
}, time * 60 * 100);
} else {
saveArchive(state);
}
showMenu();
}
})
// await checkImportArchive(data);
} catch (error) {
console.log(error);
commit('set_sys_info', { msg: t('loadError'), type: 'warning' });
commit('set_sys_info', { msg: at('error'), type: 'warning' });
}
}

4
src/views/backpack/backpack.vue

@ -18,9 +18,9 @@ import { computed, onBeforeUnmount, onMounted, ref } from "vue"; @@ -18,9 +18,9 @@ import { computed, onBeforeUnmount, onMounted, ref } from "vue";
import { useI18n } from "vue3-i18n";
import { Tooltip, Dialog } from "@/components"
import { menu_icons } from "@/config";
import Grid from './grid.vue';
import EquipMenu from './equip-menu.vue';
import Player from './player.vue';
import Grid from './grid';
import EquipMenu from './equip-menu';
const { t } = useI18n();

39
src/views/backpack/equip-menu.vue → src/views/backpack/equip-menu/equip-menu.vue

@ -1,13 +1,6 @@ @@ -1,13 +1,6 @@
<template>
<Dialog :show-header="false" v-model="show" :left="left" :top="top" padding="0" :z="10">
<PopoverMenu :items="[
{ label: t('use'), onClick: useEquip },
{ label: t('strengthen'), onClick: strengthenEquip },
{ label: t('reforge.title'), onClick: reforgeEquip },
{ label: t('inherited.0'), onClick: inheritedEquip },
{ label: state.grid[index]?.locked ? t('unlock') : t('lock'), onClick: lockEquip },
{ label: t('sell'), onClick: sellEquip },
]" />
<PopoverMenu :items="items" />
</Dialog>
<Dialog :title="t('strengthen') + t('equip')" v-model="showStrengthen" top="5rem" left="2rem" padding="0" :z="11"
@ -20,6 +13,11 @@ @@ -20,6 +13,11 @@
<Reforge ref="reforge" :equip="state.grid[index]" />
</Dialog>
<Dialog :title="t('fusion.title') + t('equip')" v-model="showFusion" top="5rem" left="2rem" padding="0" :z="11"
:obscured="true">
<Fusion :equip="state.grid[index]" />
</Dialog>
<Dialog :title="t('equip') + t('inherited.0')" v-model="showInherited" :top="state.mobile ? '5rem' : '10rem'"
left="2rem" padding="0" :z="11" :obscured="true">
<Inherited :target="equip" :source="curEquip" />
@ -36,12 +34,30 @@ import Strengthen from "./strengthen.vue"; @@ -36,12 +34,30 @@ import Strengthen from "./strengthen.vue";
import { usePopoverMenu } from "@/tool";
import Inherited from "./inherited.vue";
import Reforge from "./reforge.vue";
import Fusion from "./fusion";
import { extra_quality } from "@/config";
const { t } = useI18n();
const { state, commit, dispatch } = useStore();
const items = computed(() => {
const items = [
{ label: t('use'), onClick: useEquip },
{ label: t('strengthen'), onClick: strengthenEquip },
{ label: t('reforge.title'), onClick: reforgeEquip },
{ label: t('inherited.0'), onClick: inheritedEquip },
{ label: state.grid[index.value]?.locked ? t('unlock') : t('lock'), onClick: lockEquip },
{ label: t('sell'), onClick: sellEquip },
];
const e = equip.value;
if (e && e.quality.extraQuality == extra_quality[1]) {
e.fusion || (e.fusion = 0);
e.fusion < 3 && items.splice(4, 0, { label: t('fusion.title'), onClick: fusionEquip })
}
return items;
});
const showStrengthen = ref(false);
const showReforge = ref(false);
const showFusion = ref(false);
const showInherited = ref(false);
const { show, top, left, index, open, close } = usePopoverMenu();
const emit = defineEmits(['closePack'])
@ -73,6 +89,11 @@ const reforgeEquip = () => { @@ -73,6 +89,11 @@ const reforgeEquip = () => {
showReforge.value = true;
close();
}
const fusionEquip = () => {
emit('closePack');
showFusion.value = true;
close();
}
const lockEquip = () => {
state.grid[index.value].locked = !state.grid[index.value].locked;
close();

82
src/views/backpack/equip-menu/fusion/equip-select.vue

@ -0,0 +1,82 @@ @@ -0,0 +1,82 @@
<template>
<div class="equip-select">
<Equip v-if="equip" :equip="equip" @click="showSlect = true" />
<span v-if="!equip" class="icon" @click="showSlect = true">
<span> + </span>
</span>
<div v-if="showSlect" class="select">
<div class="option" v-for="item in equips" @click="choseEquip(item)">
<EquipIcon :equip="item" @mouseleave="commit('close_equip_tip')"
@mouseover="commit('show_equip_tip', { equip: item, compare: false, e: $event })" />
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { useStore } from "vuex";
import { reactive, onMounted, ref, watch } from "vue";
import { useI18n } from "vue3-i18n";
import Equip from "./equip.vue";
import { EquipIcon } from "@/components";
const { t } = useI18n();
const { state, commit, dispatch } = useStore();
const equip = ref<Object>();
const showSlect = ref(false);
const emit = defineEmits(['update:modelValue'])
const prop = defineProps({
modelValue: {
type: Object,
default: null
},
equips: {
type: Array as () => Object[],
default: []
}
});
watch(equip, (n, o) => {
emit('update:modelValue', n);
if (!n) {
commit('close_equip_tip');
}
})
watch(() => prop.modelValue, (n, o) => {
equip.value = n;
})
const choseEquip = item => {
equip.value = item;
showSlect.value = false;
commit('close_equip_tip');
}
onMounted(() => { });
</script>
<style lang="scss" scoped>
.equip-select {
cursor: pointer;
position: relative;
.select {
position: absolute;
top: 3.5rem;
left: 0;
width: 5rem;
height: 15rem;
z-index: 99;
}
}
.icon {
width: 3.5rem;
height: 3.5rem;
background: #000;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0.3rem;
box-shadow: inset 0 0 7px 2px #a1a1a1b8;
font-size: 2rem;
}
</style>

53
src/views/backpack/equip-menu/fusion/equip.vue

@ -0,0 +1,53 @@ @@ -0,0 +1,53 @@
<template>
<div class="fusion-equip">
<EquipIcon :equip="equip" @mouseleave="commit('close_equip_tip')" @click="emit('click')"
@mouseover="commit('show_equip_tip', { equip: equip, compare: false, e: $event })">
</EquipIcon>
<div class="entry">
<span v-if="entry">{{ t(entry.type + '.0') }} : {{ entry.showVal }}({{ entry.percent }}%)</span>
<span v-if="!entry">{{ ft('empty') }}</span>
</div>
</div>
</template>
<script lang="ts" setup>
import { useStore } from "vuex";
import { reactive, onMounted, ref, computed } from "vue";
import { useI18n } from "vue3-i18n";
import { createt } from "@/config/i18n";
import { EquipIcon } from "@/components";
const { t } = useI18n();
const ft = createt('fusion.');
const { state, commit, dispatch } = useStore();
const emit = defineEmits(['click'])
const entry = computed(() => {
if (prop.equip) {
return prop.equip.fusionEntry;
}
return null;
})
const prop = defineProps({
equip: {
type: Object,
default: null
}
});
onMounted(() => { });
</script>
<style lang="scss" scoped>
.fusion-equip {
display: flex;
margin-bottom: 1rem;
}
.entry {
padding-left: 1rem;
font-size: 1.2rem;
line-height: 3.5rem;
text-align: left;
color: white;
}
</style>

134
src/views/backpack/equip-menu/fusion/fusion.vue

@ -0,0 +1,134 @@ @@ -0,0 +1,134 @@
<template>
<div class="equip-dialog" v-if="equip">
<div class="coins">
{{ t('coins.0') }}:{{ userCoins }}
</div>
<Tooltip :infos="[ft('desc.1'), ft('desc.2'), ft('desc.3'), ft('desc.4')]" width="8rem">
<div class="descript">- {{ ft('desc.0') }} -</div>
</Tooltip>
<Equip :equip="equip" />
<EquipSelect v-model="material" :equips="materials" />
<div class='btn-div'>
<button class="button" @click="confirm.open(0, $event)" :disabled="!material">
{{ ft('need') }}{{ needCoins }} {{ ft('title') }}
</button>
</div>
</div>
<Confirm ref="confirm" width="8rem" :tip="ft('confirm.0')" :confirm="ft('confirm.1')" :cancel="ft('confirm.2')"
@confirm="confirmFusion" />
</template>
<script lang="ts" setup>
import { useStore } from "vuex";
import { reactive, onMounted, ref, computed, watch } from "vue";
import { useI18n } from "vue3-i18n";
import { createt } from "@/config/i18n";
import { Tooltip, Confirm } from "@/components";
import Equip from "./equip.vue";
import EquipSelect from "./equip-select.vue";
import * as config from "@/config";
const { t } = useI18n();
const ft = createt('fusion.');
const { state, commit, dispatch } = useStore();
const userCoins = computed(() => {
return state.playerAttribute.coins;
})
const material = ref();
const materials = ref<any>([])
const confirm = ref();
const rase = computed(() => {
if (!prop.equip || !material.value) {
return false;
}
const f1 = prop.equip.fusion;
const f2 = material.value.fusion;
const e1 = prop.equip.fusionEntry;
const e2 = material.value.fusionEntry;
if (f1 == 0 || !e1) {
return true;
}
if (f2 == 0 || !e2) {
return false;
}
return f1 == f2 && e1.type == e2.type;
});
const level = computed(() => {
let fusion = prop.equip.fusion;
return rase.value ? fusion + 1 : fusion;
})
const needCoins = computed(() => {
let factor = level.value - 1;
factor < 0 && (factor = 0);
return 100000000 * (2 ** factor);
})
const prop = defineProps({
equip: {
type: Object,
default: null
}
});
const setMaterils = () => {
if (level.value >= 3) {
materials.value = [];
return;
}
materials.value = state.grid.filter(equip => {
if (!equip) return false;
if (equip.quality.extraQuality != config.extra_quality[1]) return false;
if (equip.base.name != prop.equip.base.name) return false;
if (equip == prop.equip) return false;
if (prop.equip.fusion > 1 && (equip.fusion <= 1 || equip.fusionEntry.type != prop.equip.fusionEntry.type)) return false;
return true;
});
}
watch(() => prop.equip, (n) => {
if (n) {
setMaterils();
material.value = null;
}
})
const confirmFusion = () => {
if (!material.value) {
return;
}
if (userCoins.value < needCoins.value) {
commit("set_sys_info", { msg: t('stNoCoins'), type: "warning", });
return
}
const equip = prop.equip;
const creator = config[equip.type + 'ExtraEntry'];
const fusion = level.value;
const extraQuality = config.extra_quality[fusion - 2];
let lv = 100;
extraQuality && (lv += config.extra_quality_lv);
const type = fusion > 1 && rase.value ? equip.fusionEntry.type : null;
const entry = creator(config.qualitys[5], lv, extraQuality, type);
commit("add_player_coins", -1 * needCoins.value);
for (let i = 0; i < state.grid.length; i++) {
const tmp = state.grid[i];
if (tmp == material.value) {
state.grid[i] = null;
}
}
material.value = null;
equip.fusion = fusion;
equip.fusionEntry = entry;
dispatch('saveGame');
setMaterils();
}
onMounted(() => { });
</script>
<style lang="scss" scoped>
.btn-div {
width: 100%;
padding: 1rem;
}
</style>

3
src/views/backpack/equip-menu/fusion/index.ts

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
import Fusion from "./fusion.vue";
export default Fusion;

3
src/views/backpack/equip-menu/index.ts

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
import EquipMenu from './equip-menu.vue';
export default EquipMenu;

42
src/views/backpack/inherited.vue → src/views/backpack/equip-menu/inherited.vue

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<template>
<div class="inherited" v-if="target && source">
<div class="equip-dialog" v-if="target && source">
<div class="coins">
{{ t('coins.0') }}:{{ userCoins }}
</div>
@ -123,17 +123,6 @@ const confirmInherited = () => { @@ -123,17 +123,6 @@ const confirmInherited = () => {
onMounted(() => { });
</script>
<style lang="scss" scoped>
.inherited {
color: #f1f1f1;
width: 25rem;
height: auto;
background: rgba(0, 0, 0, 0.2);
border: #393839;
border-radius: 0.4rem;
padding: 0 1rem;
box-sizing: border-box;
}
.coins {
display: flex;
align-items: center !important;
@ -170,19 +159,6 @@ onMounted(() => { }); @@ -170,19 +159,6 @@ onMounted(() => { });
}
}
.equip {
display: flex;
width: 100%;
justify-content: center;
margin-top: 1rem;
.name {
height: 3.5rem;
line-height: 3.5rem;
margin-left: 1.6rem;
font-size: 1.2rem;
}
}
.entry {
width: 100%;
@ -211,20 +187,4 @@ onMounted(() => { }); @@ -211,20 +187,4 @@ onMounted(() => { });
}
}
@media only screen and (max-width: 768px) {
.inherited {
width: 23rem;
}
.equip .name {
height: 2.5rem;
line-height: 2.5rem;
margin-left: 1rem;
font-size: 1rem;
}
.entry {
font-size: 1rem;
}
}
</style>

104
src/views/backpack/reforge.vue → src/views/backpack/equip-menu/reforge.vue

@ -1,9 +1,19 @@ @@ -1,9 +1,19 @@
<template>
<div class="reforge" v-if="equip">
<div class="equip-dialog" v-if="equip">
<div class="coins">
{{ t('coins.0') }}:{{ useCoins }}
</div>
<Tooltip :infos="[rt('desc.1'), rt('desc.2'), rt('desc.3'), rt('desc.4')]" width="8rem">
<div class="descript">- {{ rt('desc.0') }} -</div>
</Tooltip>
<div @mouseover="reforgeFlag = true" @mouseleave="reforgeFlag = false; reforgeing = false;" @click="reforge">
<div class="equip">
<EquipIcon :equip="equip" />
<div class='name' :class="equip.quality.quality">
{{ t(equip.type + '.' + equip.base.name + '.0') }}
{{ equip.strengthenLv ? '(+' + equip.strengthenLv + ')' : '' }}
</div>
</div>
<div @mouseover="reforgeFlag = true" @mouseleave="reforgeFlag = false; reforgeing = false;" @click="reforge()">
<div class="extraEntry" v-if="!reforgeFlag || reforgeing">
<div v-if="tempEntry" class="extraEntry-item" v-for="(v, k) in tempEntry" :key="k">
<button class="button">
@ -50,7 +60,7 @@ @@ -50,7 +60,7 @@
<script lang="ts" setup>
import { useStore } from "vuex";
import { reactive, onMounted, ref, computed, watch } from "vue";
import { Tooltip } from "@/components"
import { Tooltip, EquipIcon } from "@/components"
import { createt } from "@/config/i18n";
import { Entry, extra_entry_num } from "@/config";
import * as config from "@/config";
@ -102,12 +112,31 @@ watch(() => prop.equip, (n) => { @@ -102,12 +112,31 @@ watch(() => prop.equip, (n) => {
tempEntry.value = null;
})
const reforge = () => {
const reforge = (times?) => {
times = times || 1;
const need = Math.ceil(reforgeNeed.value * (auto.value ? 1.5 : 1));
if (useCoins.value < need) {
if (useCoins.value < need * times) {
auto.value = false;
commit("set_sys_info", { msg: t('stNoCoins'), type: "warning", });
return
}
let i = 0;
let entrys = tempEntry.value || prop.equip.extraEntry;
for (; i < times; i++) {
if (!check(entrys)) {
auto.value = false;
break;
}
entrys = randomEntry();
}
commit("add_player_coins", -1 * need * i);
tempId.value = prop.equip.id;
tempEntry.value = entrys;
reforgeing.value = true;
auto.value && setTimeout(() => reforge(times), 200);
}
const randomEntry = () => {
const equip = prop.equip;
const quality = equip.quality.quality;
const extraQuality = equip.quality.extraQuality;
@ -118,12 +147,7 @@ const reforge = () => { @@ -118,12 +147,7 @@ const reforge = () => {
const entry = config[key](quality, equip.lv, extraQuality);
extraEntry.push(entry);
}
commit("add_player_coins", -1 * need);
tempId.value = equip.id;
tempEntry.value = extraEntry;
reforgeing.value = true;
check();
auto.value && setTimeout(reforge, 200);
return extraEntry;
}
const saveOld = () => {
@ -137,22 +161,19 @@ const saveNew = () => { @@ -137,22 +161,19 @@ const saveNew = () => {
tempEntry.value = null;
}
const check = () => {
debugger
if (!auto.value || !tempEntry.value) return;
const check = (entrys) => {
if (!auto.value) return true;
let cout = 0;
const entrys = tempEntry.value || prop.equip.extraEntry;
entrys.forEach(entry => {
if (entry.type == autoAttr.value) {
cout++;
}
})
auto.value = cout < autoNum.value;
return cout < autoNum.value;
}
const startAuto = () => {
auto.value = true;
check();
auto.value && reforge();
reforge(state.speed);
}
const stopAuto = () => {
auto.value = false;
@ -161,27 +182,7 @@ const stopAuto = () => { @@ -161,27 +182,7 @@ const stopAuto = () => {
onMounted(() => { });
</script>
<style lang="scss" scoped>
.reforge {
color: #f1f1f1;
width: 25rem;
height: auto;
background: rgba(0, 0, 0, 0.2);
border: #393839;
border-radius: 0.4rem;
padding: 1rem;
box-sizing: border-box;
.descript {
font-family: 'MaShanZheng' !important;
display: flex;
align-items: center !important;
justify-content: center;
font-size: 1.6rem;
padding: 1.4rem 0.7rem;
color: #efb96e;
}
.extraEntry {
.extraEntry {
display: flex;
flex-direction: column;
justify-content: center;
@ -205,38 +206,25 @@ onMounted(() => { }); @@ -205,38 +206,25 @@ onMounted(() => { });
border: 0;
width: 80%;
}
}
}
.reforge-tip {
.reforge-tip {
width: 100%;
flex-direction: column;
display: flex;
justify-content: center;
height: v-bind('height');
color: #68d5ed;
}
}
.red {
.red {
color: red !important;
}
}
.btn-group {
.btn-group {
margin-bottom: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
}
}
@media only screen and (max-width: 768px) {
.reforge {
width: 23rem;
}
.extraEntry {
font-size: 1rem;
}
}
</style>

123
src/views/backpack/strengthen.vue → src/views/backpack/equip-menu/strengthen.vue

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<template>
<div class="strengthen" v-if="equip">
<div class="equip-dialog" v-if="equip">
<div class="coins">
{{ t('coins.0') }}:{{ useCoins }}
</div>
@ -32,12 +32,12 @@ @@ -32,12 +32,12 @@
</div>
<div class="btn-group" v-if='!auto'>
<p>{{ t('stren.0') }}<span :class="{ 'red': useCoins < needCoins }">{{ needCoins }}</span></p>
<button class="button" @click="strengthen(false)">{{ t('stren.1') }}+{{ parseInt(equip.strengthenLv) + 1
<button class="button" @click="strengthen()">{{ t('stren.1') }}+{{ parseInt(equip.strengthenLv) + 1
}}</button>
</div>
<div class="btn-group" v-if='!auto'>
<p>{{ t('stren.0') }}<span :class="{ 'red': useCoins < needCoins }">{{ needCoins }}</span></p>
<button class="button" @click="strengthen(true)">{{ t('stren.2') }}</button>
<button class="button" @click="strengthenTest">{{ t('stren.2') }}</button>
<span v-if="testFlag">{{ equip.strengthenLv }}<span class="arror"></span>{{ testResult }}</span>
</div>
<div class="btn-group" v-if='!auto'>
@ -58,9 +58,8 @@ import { reactive, onMounted, ref, computed, watch } from "vue"; @@ -58,9 +58,8 @@ import { reactive, onMounted, ref, computed, watch } from "vue";
import { useI18n } from "vue3-i18n";
import { Tooltip, EquipIcon } from "@/components"
import { strengthenValue, strengthenCoins, replace } from "@/tool"
import { extra_entry_num, weaponExtraEntry, armorExtraEntry, neckExtraEntry, ringExtraEntry, strengthen_rates, jewelryExtraEntry, pantsExtraEntry, shoesExtraEntry, bracersExtraEntry, Entry } from "@/config";
import { strengthen_rates } from "@/config";
import { createt } from "@/config/i18n";
import Reforge from "./reforge.vue";
const mt = createt('backpack.');
const { t } = useI18n();
@ -84,37 +83,56 @@ const needCoins = computed(() => { @@ -84,37 +83,56 @@ const needCoins = computed(() => {
return strengthenCoins(prop.equip.lv, prop.equip.strengthenLv, prop.equip.quality.quality);
})
const strengthen = (test?) => {
if (auto.value && prop.equip.strengthenLv >= autoLv.value) {
const strengthen = (times?) => {
times = times || 1;
if (!checkCoins(times)) {
return;
}
testFlag.value = false;
let lv = prop.equip.strengthenLv;
let i = 0;
for (; i < times; i++) {
if (auto.value && lv >= autoLv.value) {
auto.value = false;
commit("set_sys_info", { msg: t('strengthenFinish'), type: "win", });
break;
}
lv += callResult(lv);
}
prop.equip.strengthenLv = lv;
dispatch('saveGame');
commit("add_player_coins", -1 * needCoins.value * i);
auto.value && setTimeout(() => strengthen(times), 200);
};
const strengthenTest = () => {
if (!checkCoins(1)) {
return;
}
if (useCoins.value < needCoins.value) {
const result = callResult(prop.equip.strengthenLv);
testResult.value = prop.equip.strengthenLv + result;
testFlag.value = true;
}
const checkCoins = (times) => {
if (useCoins.value < needCoins.value * times) {
auto.value = false;
commit("set_sys_info", { msg: t('stNoCoins'), type: "warning", });
return
return false;
}
const lv = prop.equip.strengthenLv;
return true;
}
const callResult = (lv) => {
const len = strengthen_rates.length;
const rate = lv < len ? strengthen_rates[lv] : strengthen_rates[len - 1];
const result = Math.random() < rate ? 1 : -1;
return result;
}
if (test) {
testFlag.value = true;
testResult.value = prop.equip.strengthenLv + result;
} else {
testFlag.value = false;
prop.equip.strengthenLv += result;
dispatch('saveGame');
}
commit("add_player_coins", -1 * needCoins.value);
auto.value && setTimeout(strengthen, 200);
};
const startAuto = () => {
auto.value = true;
strengthen();
strengthen(state.speed);
};
const stopAuto = () => {
auto.value = false;
@ -125,48 +143,6 @@ defineExpose({ stopAuto }) @@ -125,48 +143,6 @@ defineExpose({ stopAuto })
onMounted(() => { });
</script>
<style lang="scss" scoped>
.strengthen {
color: #f1f1f1;
width: 25rem;
height: auto;
background: rgba(0, 0, 0, 0.2);
border: #393839;
border-radius: 0.4rem;
padding: 1rem;
box-sizing: border-box;
}
.coins {
display: flex;
align-items: center !important;
justify-content: center;
font-size: 1.1rem;
color: #2fe20f;
}
.descript {
font-family: 'MaShanZheng' !important;
display: flex;
align-items: center !important;
justify-content: center;
font-size: 1.6rem;
padding: 1.4rem 0.7rem;
color: #efb96e;
}
.equip {
display: flex;
width: 100%;
justify-content: center;
.name {
height: 3.5rem;
line-height: 3.5rem;
margin-left: 1.6rem;
font-size: 1.2rem;
}
}
.entry {
width: 100%;
padding: 1rem;
@ -200,21 +176,4 @@ onMounted(() => { }); @@ -200,21 +176,4 @@ onMounted(() => { });
color: red;
}
}
@media only screen and (max-width: 768px) {
.strengthen {
width: 23rem;
}
.equip .name {
height: 2.5rem;
line-height: 2.5rem;
margin-left: 1rem;
font-size: 1rem;
}
.entry {
font-size: 1rem;
}
}
</style>

0
src/views/backpack/auto-sell.vue → src/views/backpack/grid/auto-sell.vue

10
src/views/backpack/grid.vue → src/views/backpack/grid/grid.vue

@ -49,7 +49,7 @@ const userCoins = computed(() => { @@ -49,7 +49,7 @@ const userCoins = computed(() => {
})
const needCoins = 2000000;
const addNum = 8;
const maxNum = 320;
// const maxNum = 320;
const itemNum = computed(() => {
let i = 0;
@ -91,10 +91,10 @@ mobile.onClick = (e, data) => { @@ -91,10 +91,10 @@ mobile.onClick = (e, data) => {
}
const addGrid = (e) => {
if (grid.value.length >= maxNum) {
commit("set_sys_info", { msg: replace(t('addGrid.4'), [maxNum]), type: "warning", });
return;
}
// if (grid.value.length >= maxNum) {
// commit("set_sys_info", { msg: replace(t('addGrid.4'), [maxNum]), type: "warning", });
// return;
// }
confirm.value.open(0, e)
}
const confirmAddGrid = () => {

3
src/views/backpack/grid/index.ts

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
import Grid from './grid.vue';
export default Grid;

11
src/views/point/point.vue

@ -113,17 +113,18 @@ const changeAttribute = () => { @@ -113,17 +113,18 @@ const changeAttribute = () => {
const point = rp.has;
const oldPoint = rp[curAttr];
let num = 0;
if (curNum > 0 && point > 0) {
num = point - curNum < 0 ? point : curNum;
} else if (curNum < 0 && oldPoint > 0) {
num = oldPoint + curNum < 0 ? oldPoint * -1 : curNum;
let tmp = curNum * state.speed;
if (tmp > 0 && point > 0) {
num = point - tmp < 0 ? point : tmp;
} else if (tmp < 0 && oldPoint > 0) {
num = oldPoint + tmp < 0 ? oldPoint * -1 : tmp;
}
if (num != 0) {
rp[curAttr] = oldPoint + num;
rp.has = point - num;
commit('set_points', rp)
}
setTimeout(changeAttribute, 100);
setTimeout(changeAttribute, 200);
}
}

7
src/views/save-game.vue

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<template>
<Tooltip :infos="[t('saveGame.0'), t('saveGame.1')]" width="12rem">
<Tooltip :infos="[at('save.0'), at('save.1')]" width="12rem">
<img class="menu-img" :src="menu_icons.saveGame" @click="saveGame">
</Tooltip>
</template>
@ -7,12 +7,11 @@ @@ -7,12 +7,11 @@
<script lang="ts" setup>
import { useStore } from "vuex";
import { onBeforeUnmount, onMounted, ref } from "vue";
import { useI18n } from "vue3-i18n";
import { Tooltip } from "@/components"
import { menu_icons } from "@/config";
import { Base64 } from "js-base64";
import { createt } from "@/config/i18n";
const { t } = useI18n();
const at = createt('archive.');
const { state, commit, dispatch } = useStore();
let interval = 0;

13
src/views/setting.vue

@ -21,6 +21,15 @@ @@ -21,6 +21,15 @@
<input type="radio" :value="0" v-model="settings.battle"> {{ t('battle.2') }}
</div>
</div>
<div class="item">
<div class="label">{{ t('speed.0') }}</div>
<div class="options">
<input type="radio" :value="1" v-model="settings.speed"> {{ t('speed.1') }}
<input type="radio" :value="10" v-model="settings.speed"> 10{{ t('speed.2') }}
<input type="radio" :value="50" v-model="settings.speed"> 50{{ t('speed.2') }}
<input type="radio" :value="100" v-model="settings.speed"> 100{{ t('speed.2') }}
</div>
</div>
</div>
<div class="footer">
<button class="button" @click="saveSettings">{{ t('action.0') }}</button>
@ -46,7 +55,8 @@ const show = computed(() => { @@ -46,7 +55,8 @@ const show = computed(() => {
const settings = ref({
type: 'setting',
music: 0.01,
battle: 1
battle: 1,
speed: 1,
})
const saveSettings = () => {
@ -58,6 +68,7 @@ const saveSettings = () => { @@ -58,6 +68,7 @@ const saveSettings = () => {
const set = () => {
dispatch('set_music_volume', settings.value.music);
state.battleLog = settings.value.battle;
state.speed = settings.value.speed || 1;
}
const readSetting = () => {

42
src/views/version/update-log.vue

@ -38,7 +38,45 @@ const hisVersions = [ @@ -38,7 +38,45 @@ const hisVersions = [
]
const updateLogs: any = [{
date: '2025-05-22', version: '1.0',
date: '2025-05-27', version: '1.0',
adjust: [
'暴雪,青光,杀意被动数值调整',
'功能加速优化逻辑',
'装备图标增加星级展示',
'新增神话装备:金戒指,最初的彼岸花',
'鱼蓝被动数值调整',
'青光被动数值调整',
'修复自动强化BUG',
],
bug: ['修复增加金币获取的装备不能叠加的BUG',]
}, {
date: '2025-05-27', version: '1.0',
adjust: [
'新增太古装备融合功能',
'加强存档校验',
'系统设置新增游戏加速(强化和重铸)',
'加点速度也受游戏加速影响',
'降低太古升2/3星费用',
'游戏加速改为功能加速',
'取消背包格子限制',
],
bug: [
'修复远古装备也能做融合材料BUG',
'修复装备融合BUG可以不消耗材料BUG'
]
}, {
date: '2025-05-26', version: '1.0',
adjust: [
'新增神话武器:银河裂',
'见红施加的流血提高到6回合',
'流血伤害可以被感电影响',
'提高技能裂银河优先级,降低技能琉璃盘优先级',
],
bug: [
'修复流萤荧光层数显示错误BUG',
]
}, {
date: '2025-05-25', version: '1.0',
adjust: [
'新增神话装备:黑白钻戒,流萤',
'神话装备【求爱】技能调整',
@ -51,7 +89,7 @@ const updateLogs: any = [{ @@ -51,7 +89,7 @@ const updateLogs: any = [{
'修复黑白钻戒名字不显示问题'
]
}, {
date: '2025-05-22', version: '1.0',
date: '2025-05-24', version: '1.0',
adjust: [
'弹窗可拖动位置',
'自动重铸费用改为1.5倍',

Loading…
Cancel
Save