• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RingOfThorns类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.watabou.pixeldungeon.items.rings.RingOfThorns的典型用法代码示例。如果您正苦于以下问题:Java RingOfThorns类的具体用法?Java RingOfThorns怎么用?Java RingOfThorns使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

RingOfThorns类属于com.watabou.pixeldungeon.items.rings包,在下文中一共展示了RingOfThorns类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: defenseProc

点赞 3

import com.watabou.pixeldungeon.items.rings.RingOfThorns; //导入依赖的package包/类
@Override
public int defenseProc( Char enemy, int damage ) {
	
	RingOfThorns.Thorns thorns = buff( RingOfThorns.Thorns.class ); 
	if (thorns != null) {
		int dmg = Random.IntRange( 0, damage );
		if (dmg > 0) {
			enemy.damage( dmg, thorns );
		}
	}
	
	Earthroot.Armor armor = buff( Earthroot.Armor.class );
	if (armor != null) {
		damage = armor.absorb( damage );
	}
	
	if (belongings.armor != null) {
		damage = belongings.armor.proc( enemy, this, damage );
	}
	
	return damage;
}
 

开发者ID:kurtyu,
项目名称:PixelDungeonTC,
代码行数:23,
代码来源:Hero.java

示例2: DM300

点赞 3

import com.watabou.pixeldungeon.items.rings.RingOfThorns; //导入依赖的package包/类
public DM300() {
	spriteClass = DM300Sprite.class;
	
	hp(ht(200));
	exp = 30;
	defenseSkill = 18;
	
	float dice = Random.Float();
	if( dice < 0.5 ) {
		loot = new ChaosCrystal();
	} else {
		loot = new RingOfThorns().random();
	}
	
	lootChance = 0.333f;
	
	IMMUNITIES.add( ToxicGas.class );
	IMMUNITIES.add( Bleeding.class );
}
 

开发者ID:NYRDS,
项目名称:pixel-dungeon-remix,
代码行数:20,
代码来源:DM300.java

示例3: validateRingOfThorns

点赞 2

import com.watabou.pixeldungeon.items.rings.RingOfThorns; //导入依赖的package包/类
public static void validateRingOfThorns() {
	if (!local.contains( Badge.RING_OF_THORNS ) && new RingOfThorns().isKnown()) {
		Badge badge = Badge.RING_OF_THORNS;
		local.add( badge );
		displayBadge( badge );
	}
}
 

开发者ID:kurtyu,
项目名称:PixelDungeonTC,
代码行数:8,
代码来源:Badges.java

示例4: defenseProc

点赞 2

import com.watabou.pixeldungeon.items.rings.RingOfThorns; //导入依赖的package包/类
@Override
public int defenseProc(Char enemy, int damage) {
	damage = super.defenseProc(enemy, damage);

	RingOfThorns.Thorns thorns = buff(RingOfThorns.Thorns.class);
	if (thorns != null) {
		int dmg = Random.IntRange(0, damage);
		if (dmg > 0) {
			enemy.damage(dmg, thorns);
		}
	}

	if (buff(HeartOfDarkness.HeartOfDarknessBuff.class) != null) {
		int spiritPos = Dungeon.level.getEmptyCellNextTo(getPos());

		if (Dungeon.level.cellValid(spiritPos)) {
			SpiritOfPain spirit = new SpiritOfPain();
			spirit.setPos(spiritPos);
			Dungeon.level.spawnMob(spirit, 0);
			Actor.addDelayed(new Pushing(spirit, getPos(), spirit.getPos()), -1);
			Mob.makePet(spirit, this);
		}
	}

	if (belongings.armor != null) {
		damage = belongings.armor.proc(enemy, this, damage);
	}

	return damage;
}
 

开发者ID:NYRDS,
项目名称:pixel-dungeon-remix,
代码行数:31,
代码来源:Hero.java

示例5: validateRingOfThorns

点赞 2

import com.watabou.pixeldungeon.items.rings.RingOfThorns; //导入依赖的package包/类
public static void validateRingOfThorns() {
	if (!local.contains(Badge.RING_OF_THORNS) && new RingOfThorns().isKnown()) {
		Badge badge = Badge.RING_OF_THORNS;
		local.add(badge);
		displayBadge(badge);
	}
}
 

开发者ID:NYRDS,
项目名称:pixel-dungeon-remix,
代码行数:8,
代码来源:Badges.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)