mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-19 07:41:20 +08:00
[BREAKING] Item Usage Overhaul
-De-hardcode elemental orb values -De-hardcode exp items -Change ShopChest format (temporary, drop system overhaul will replace it entirely) -Food healing actually uses Ability data for real HP amounts
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
|
||||
public class ItemUseAddCurHp extends ItemUseInt {
|
||||
private String icon;
|
||||
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_ADD_CUR_HP;
|
||||
}
|
||||
|
||||
public ItemUseAddCurHp(String[] useParam) {
|
||||
super(useParam);
|
||||
this.icon = useParam[1];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useItem(UseItemParams params) {
|
||||
return (params.targetAvatar.getAsEntity().heal(params.count * this.i) > 0.01);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user