减少武器升级所需经验,减少弹药制造成本

This commit is contained in:
Atsuihsio 2024-06-24 13:37:57 +08:00
parent 23df8f7a2f
commit d0ecd7349a
13 changed files with 14 additions and 14 deletions

View file

@ -127,7 +127,7 @@ public class PlayerEventHandler {
if (tag.getInt("level") == 0) { if (tag.getInt("level") == 0) {
tag.putDouble("exp2", 20); tag.putDouble("exp2", 20);
} else { } else {
tag.putDouble("exp2", (tag.getDouble("exp1") + tag.getInt("level") * 500)); tag.putDouble("exp2", (tag.getDouble("exp1") + tag.getInt("level") * 200 * (1 + 0.1 * tag.getInt("level"))));
} }
if (tag.getDouble("damagetotal") >= tag.getDouble("exp2")) { if (tag.getDouble("damagetotal") >= tag.getDouble("exp2")) {
tag.putDouble("exp1", (tag.getDouble("exp2"))); tag.putDouble("exp1", (tag.getDouble("exp2")));

View file

@ -12,7 +12,7 @@ import java.util.List;
public class HandgunAmmo extends AmmoSupplierItem { public class HandgunAmmo extends AmmoSupplierItem {
public HandgunAmmo() { public HandgunAmmo() {
super(GunInfo.Type.HANDGUN, 5, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON)); super(GunInfo.Type.HANDGUN, 10, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON));
} }
@Override @Override

View file

@ -10,7 +10,7 @@ import java.util.List;
public class HandgunAmmoBox extends AmmoSupplierItem { public class HandgunAmmoBox extends AmmoSupplierItem {
public HandgunAmmoBox() { public HandgunAmmoBox() {
super(GunInfo.Type.HANDGUN, 30, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON)); super(GunInfo.Type.HANDGUN, 60, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON));
} }
@Override @Override

View file

@ -12,7 +12,7 @@ import java.util.List;
public class RifleAmmo extends AmmoSupplierItem { public class RifleAmmo extends AmmoSupplierItem {
public RifleAmmo() { public RifleAmmo() {
super(GunInfo.Type.RIFLE, 5, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON)); super(GunInfo.Type.RIFLE, 10, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON));
} }
@Override @Override

View file

@ -10,7 +10,7 @@ import java.util.List;
public class RifleAmmoBox extends AmmoSupplierItem { public class RifleAmmoBox extends AmmoSupplierItem {
public RifleAmmoBox() { public RifleAmmoBox() {
super(GunInfo.Type.RIFLE, 30, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON)); super(GunInfo.Type.RIFLE, 60, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON));
} }
@Override @Override

View file

@ -12,7 +12,7 @@ import java.util.List;
public class ShotgunAmmo extends AmmoSupplierItem { public class ShotgunAmmo extends AmmoSupplierItem {
public ShotgunAmmo() { public ShotgunAmmo() {
super(GunInfo.Type.SHOTGUN, 2, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON)); super(GunInfo.Type.SHOTGUN, 4, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON));
} }
@Override @Override

View file

@ -10,7 +10,7 @@ import java.util.List;
public class ShotgunAmmoBox extends AmmoSupplierItem { public class ShotgunAmmoBox extends AmmoSupplierItem {
public ShotgunAmmoBox() { public ShotgunAmmoBox() {
super(GunInfo.Type.SHOTGUN, 12, new Item.Properties().stacksTo(8).rarity(Rarity.COMMON)); super(GunInfo.Type.SHOTGUN, 24, new Item.Properties().stacksTo(8).rarity(Rarity.COMMON));
} }
@Override @Override

View file

@ -12,7 +12,7 @@ import java.util.List;
public class SniperAmmo extends AmmoSupplierItem { public class SniperAmmo extends AmmoSupplierItem {
public SniperAmmo() { public SniperAmmo() {
super(GunInfo.Type.SNIPER, 2, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON)); super(GunInfo.Type.SNIPER, 4, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON));
} }
@Override @Override

View file

@ -10,7 +10,7 @@ import java.util.List;
public class SniperAmmoBox extends AmmoSupplierItem { public class SniperAmmoBox extends AmmoSupplierItem {
public SniperAmmoBox() { public SniperAmmoBox() {
super(GunInfo.Type.SNIPER, 12, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON)); super(GunInfo.Type.SNIPER, 24, new Item.Properties().stacksTo(64).rarity(Rarity.COMMON));
} }
@Override @Override

View file

@ -18,6 +18,6 @@
}, },
"result": { "result": {
"item": "target:handgun_ammo", "item": "target:handgun_ammo",
"count": 3 "count": 6
} }
} }

View file

@ -19,6 +19,6 @@
}, },
"result": { "result": {
"item": "target:rifle_ammo", "item": "target:rifle_ammo",
"count": 3 "count": 6
} }
} }

View file

@ -2,7 +2,7 @@
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shaped",
"category": "misc", "category": "misc",
"pattern": [ "pattern": [
"aba", " b ",
"aba", "aba",
"cdc" "cdc"
], ],
@ -22,6 +22,6 @@
}, },
"result": { "result": {
"item": "target:shotgun_ammo", "item": "target:shotgun_ammo",
"count": 3 "count": 6
} }
} }

View file

@ -19,6 +19,6 @@
}, },
"result": { "result": {
"item": "target:sniper_ammo", "item": "target:sniper_ammo",
"count": 3 "count": 6
} }
} }