Skip to content

Commit

Permalink
fire and draining leveling
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarstonConnell committed Jan 13, 2024
1 parent ed332f9 commit f1af694
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 52 deletions.
88 changes: 44 additions & 44 deletions MODIFIERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,58 @@
This is a full list of modifiers in the game and a description of what they do.
## Breakers
These effects are applied when breaking blocks.
### Magnetic
**id:** `attracting` | **crafting:** `minecraft:iron_block` ![iron_block](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/iron_block.png)
### Explosive
**id:** `explode` | **crafting:** `minecraft:tnt` ![tnt](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/tnt.png)

**Decription:** Upon breaking a block (allowed by tool type), all items at that block's position will teleport to you.
### Learning
**id:** `learning` | **crafting:** `minecraft:book` ![book](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/book.png)
**Decription:** Upon breaking a block (allowed by tool type), the current block position will explode causing damage to surrounding blocks.
### Veiny
**id:** `veiny` | **crafting:** `minecraft:diamond_pickaxe` ![diamond_pickaxe](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/diamond_pickaxe.png)

**Decription:** After breaking 10 blocks as allowed by this tool, gain 3 experience points.
**Decription:** Breaking any block while crouching will cause all blocks of the same type adjacent to it to break up to 5 in each direction.
### Melting
**id:** `melting` | **crafting:** `minecraft:magma_cream` ![magma_cream](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/magma_cream.png)

**Decription:** Items dropped by blocks broken with this tool will be smelted.
### Veiny
**id:** `veiny` | **crafting:** `minecraft:diamond_pickaxe` ![diamond_pickaxe](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/diamond_pickaxe.png)
### Learning
**id:** `learning` | **crafting:** `minecraft:book` ![book](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/book.png)

**Decription:** Breaking any block while crouching will cause all blocks of the same type adjacent to it to break up to 5 in each direction.
### Explosive
**id:** `explode` | **crafting:** `minecraft:tnt` ![tnt](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/tnt.png)
**Decription:** After breaking 10 blocks as allowed by this tool, gain 3 experience points.
### Magnetic
**id:** `attracting` | **crafting:** `minecraft:iron_block` ![iron_block](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/iron_block.png)

**Decription:** Upon breaking a block (allowed by tool type), the current block position will explode causing damage to surrounding blocks.
**Decription:** Upon breaking a block (allowed by tool type), all items at that block's position will teleport to you.
## Holders
These effects are applied when holding the tool.
### Living
**id:** `living` | **crafting:** `minecraft:moss_block` ![moss_block](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/moss_block.png)
### Tomb Raider
**id:** `spawner` | **crafting:** `minecraft:mossy_cobblestone` ![mossy_cobblestone](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/mossy_cobblestone.png)

**Decription:** While holding the tool, it will randomly heal itself
**Decription:** While holding the spawners around you will glow.
### Hasty
**id:** `hasty` | **crafting:** `minecraft:sugar` ![sugar](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/sugar.png)

**Decription:** While holding the tool, get the Haste I effect.
### Detecting
**id:** `detecting` | **crafting:** `minecraft:spyglass` ![spyglass](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/spyglass.png)

**Decription:** While holding the tool, ores around you will glow.
### Tomb Raider
**id:** `spawner` | **crafting:** `minecraft:mossy_cobblestone` ![mossy_cobblestone](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/mossy_cobblestone.png)
### Living
**id:** `living` | **crafting:** `minecraft:moss_block` ![moss_block](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/moss_block.png)

**Decription:** While holding the spawners around you will glow.
**Decription:** While holding the tool, it will randomly heal itself
### Appley
**id:** `absorption` | **crafting:** `minecraft:golden_apple` ![golden_apple](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/golden_apple.png)

**Decription:** While holding the tool, get the absorption effect.
### Rainy
**id:** `rainy` | **crafting:** `minecraft:cauldron` ![cauldron](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/cauldron.png)

**Decription:** While holding the tool in the rain, mine faster!
### Filling
**id:** `filling` | **crafting:** `minecraft:cake` ![cake](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/cake.png)

**Decription:** While holding the tool, get the saturation effect.
### Rainy
**id:** `rainy` | **crafting:** `minecraft:cauldron` ![cauldron](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/cauldron.png)
### Detecting
**id:** `detecting` | **crafting:** `minecraft:spyglass` ![spyglass](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/spyglass.png)

**Decription:** While holding the tool in the rain, mine faster!
**Decription:** While holding the tool, ores around you will glow.
## Users
These effects are applied when right clicking.
### Fire Starter
**id:** `fire_place` | **crafting:** `minecraft:flint_and_steel` ![flint_and_steel](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/flint_and_steel.png)

**Decription:** Right clicking on the top of a block while crouching with the tool in hand will start a fire and use 2 durability points.
### Flame Thrower
**id:** `flame_thrower` | **crafting:** `minecraft:fire_charge` ![fire_charge](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/fire_charge.png)

**Decription:** Right clicking throws a fire ball.
### Spelunking
**id:** `torch_place` | **crafting:** `minecraft:glowstone` ![glowstone](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/glowstone.png)

Expand All @@ -70,36 +62,44 @@ These effects are applied when right clicking.
**id:** `dirt_place` | **crafting:** `minecraft:dirt` ![dirt](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/dirt.png)

**Decription:** Right clicking on the top of a block with the tool in hand will place a dirt block and use 1 durability points.
### Flame Thrower
**id:** `flame_thrower` | **crafting:** `minecraft:fire_charge` ![fire_charge](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/fire_charge.png)

**Decription:** Right clicking throws a fire ball.
### Fire Starter
**id:** `fire_place` | **crafting:** `minecraft:flint_and_steel` ![flint_and_steel](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/flint_and_steel.png)

**Decription:** Right clicking on the top of a block while crouching with the tool in hand will start a fire and use 2 durability points.
## Hurters
These effects are applied when hurting enemies.
### Charged
**id:** `charged` | **crafting:** `minecraft:lightning_rod` ![lightning_rod](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/lightning_rod.png)
### Poisonous
**id:** `poison` | **crafting:** `minecraft:poisonous_potato` ![poisonous_potato](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/poisonous_potato.png)

**Decription:** After 7 seconds, hitting and enemy will summon a lightning bolt and empty the charge meter.
**Decription:** When attacking with tool, apply the poison effect to the target.
### Withering
**id:** `wither` | **crafting:** `minecraft:wither_rose` ![wither_rose](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/wither_rose.png)

**Decription:** When attacking with tool, apply the wither effect to the target.
### Dexterous
**id:** `combo` | **crafting:** `minecraft:chorus_fruit` ![chorus_fruit](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/chorus_fruit.png)

**Decription:** Hitting enemies within 2 seconds after hitting them deals an extra 25% damage.
### Critical
**id:** `critical` | **crafting:** `minecraft:ghast_tear` ![ghast_tear](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/ghast_tear.png)

**Decription:** Always critically strikes enemy.
### Charged
**id:** `charged` | **crafting:** `minecraft:lightning_rod` ![lightning_rod](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/lightning_rod.png)

**Decription:** After 7 seconds, hitting and enemy will summon a lightning bolt and empty the charge meter.
### Blinding
**id:** `blinding` | **crafting:** `minecraft:carrot` ![carrot](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/carrot.png)

**Decription:** When attacking with tool, apply the blindness effect to the target.
### Dexterous
**id:** `combo` | **crafting:** `minecraft:chorus_fruit` ![chorus_fruit](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/chorus_fruit.png)

**Decription:** Hitting enemies within 2 seconds after hitting them deals an extra 25% damage.
### Necrotic
**id:** `necrotic` | **crafting:** `minecraft:wither_skeleton_skull` ![wither_skeleton_skull](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/wither_skeleton_skull.png)

**Decription:** Heals 10% of damage dealt to target.
### Poisonous
**id:** `poison` | **crafting:** `minecraft:poisonous_potato` ![poisonous_potato](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/poisonous_potato.png)

**Decription:** When attacking with tool, apply the poison effect to the target.
### Flaming
**id:** `flaming` | **crafting:** `minecraft:blaze_rod` ![blaze_rod](https://raw.githubusercontent.com/anish-shanbhag/minecraft-api/master/public/images/items/blaze_rod.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ public Modifier fromNBT(CompoundTag tag) {

@Override
public String name() {
return name;
if (points == 2) {
return name;
}
return name + " " + LootUtils.roman(points - 1);
}

@Override
Expand All @@ -69,7 +72,11 @@ public String color() {

@Override
public String description() {
return "Heals 10% of damage dealt to target.";
return "Heals " + String.format("%.0f", drain() * 100) + "% of damage dealt to target.";
}

public float drain() {
return ((float) this.points) * 0.05f;
}

@Override
Expand Down Expand Up @@ -100,15 +107,15 @@ public boolean forTool(ToolType type) {
public boolean hurtEnemy(ItemStack itemstack, LivingEntity hurtee, LivingEntity hurter) {
float damage = LootItem.getAttackDamage(itemstack, LootUtils.getToolType(itemstack));

hurter.heal(damage * 0.25f);
hurter.heal(damage * drain());
return false;
}

public boolean canLevel() {
return false;
return this.points < 10;
}

public void levelUp() {
return;
this.points++;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import javax.annotation.Nullable;

import dev.marston.randomloot.loot.LootItem.ToolType;
import dev.marston.randomloot.loot.LootUtils;
import dev.marston.randomloot.loot.modifiers.EntityHurtModifier;
import dev.marston.randomloot.loot.modifiers.Modifier;
import net.minecraft.ChatFormatting;
Expand Down Expand Up @@ -52,7 +53,10 @@ public Modifier fromNBT(CompoundTag tag) {

@Override
public String name() {
return name;
if (points == 2) {
return name;
}
return name + " " + LootUtils.roman(points - 1);
}

@Override
Expand Down Expand Up @@ -101,10 +105,10 @@ public boolean hurtEnemy(ItemStack itemstack, LivingEntity hurtee, LivingEntity
}

public boolean canLevel() {
return false;
return this.points < 4;
}

public void levelUp() {
return;
this.points++;
}
}

0 comments on commit f1af694

Please sign in to comment.