blob: e011cf73427cf4d9d31335b2b59c9c2f2e75055d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package jp.plusplus.fbs.magic;
import jp.plusplus.fbs.api.MagicBase;
import jp.plusplus.fbs.entity.EntityMagicHealingBall;
import net.minecraft.entity.Entity;
/**
* Createdby pluslus_Fon 2015/06/14.
*/
public class MagicHealingBall extends MagicBase {
@Override
public boolean checkSuccess() {
if(isSpelled) return true;
float prob=0.4f+0.02f*getLvDiff();
return rand.nextFloat()<=prob;
}
@Override
public void success() {
int a = 5+getLvDiff()/4;
Entity e=new EntityMagicHealingBall(world, player, a);
world.spawnEntityInWorld(e);
}
@Override
public void failure() {
sanity(2, 6);
}
}
|