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

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

java 1次浏览

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

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

示例1: attackProc

点赞 3

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
@Override
public int attackProc(@NonNull Char enemy, int damage ) {
    //Life drain proc
    if (Random.Int(3) == 1){
        CellEmitter.center(this.getPos()).start(Speck.factory(Speck.HEALING), 0.3f, 3);
        this.hp(this.hp() + damage );
    }
    //Bleeding proc
    if (Random.Int(3) == 1){
        Buff.affect(enemy, Bleeding.class).set(damage);
    }
    //Double damage proc
    if (Random.Int(3) == 1){
        Devour.hit(enemy);
        Sample.INSTANCE.play(Assets.SND_BITE);
        return damage*2;
    }
    return damage;
}
 

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

示例2: ArmoredStatue

点赞 3

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
public ArmoredStatue() {
	exp = 0;
	setState(PASSIVE);

	do {
		armor = (Armor) Generator.random( Generator.Category.ARMOR );
	} while (!(armor instanceof Armor) || armor.level() < 0);

	armor.identify();
	armor.inscribe( Armor.Glyph.random() );

	hp(ht(15 + Dungeon.depth * 5));
	defenseSkill = 4 + Dungeon.depth + armor.DR;
	
	RESISTANCES.add( ToxicGas.class );
	RESISTANCES.add( Poison.class );
	RESISTANCES.add( Death.class );
	RESISTANCES.add( ScrollOfPsionicBlast.class );
	IMMUNITIES.add( Leech.class );
	IMMUNITIES.add( Bleeding.class );
}
 

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

示例3: Elemental

点赞 3

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
public Elemental() {
	spriteClass = ElementalSprite.class;
	
	hp(ht(65));
	defenseSkill = 20;
	
	exp = 10;
	maxLvl = 20;
	
	flying = true;
	
	loot = new PotionOfLiquidFlame();
	lootChance = 0.1f;
	
	IMMUNITIES.add( Burning.class );
	IMMUNITIES.add( Fire.class );
	IMMUNITIES.add( WandOfFirebolt.class );
	IMMUNITIES.add( ScrollOfPsionicBlast.class );
	IMMUNITIES.add( Bleeding.class );
}
 

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

示例4: Statue

点赞 3

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
public Statue() {
	spriteClass = StatueSprite.class;

	exp = 0;
	setState(PASSIVE);
	
	do {
		weapon = (Weapon)Generator.random( Generator.Category.WEAPON );
	} while (!(weapon instanceof MeleeWeapon) || weapon.level() < 0);
	
	weapon.identify();
	weapon.enchant( Enchantment.random() );
	
	hp(ht(15 + Dungeon.depth * 5));
	defenseSkill = 4 + Dungeon.depth;
	
	RESISTANCES.add( ToxicGas.class );
	RESISTANCES.add( Poison.class );
	RESISTANCES.add( Death.class );
	RESISTANCES.add( ScrollOfPsionicBlast.class );
	IMMUNITIES.add( Leech.class );
	IMMUNITIES.add(Bleeding.class);
}
 

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

示例5: Golem

点赞 3

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
public Golem() {
	spriteClass = GolemSprite.class;
	
	hp(ht(85));
	defenseSkill = 18;
	
	exp = 12;
	maxLvl = 22;
	
	RESISTANCES.add( ScrollOfPsionicBlast.class );
	
	IMMUNITIES.add( Amok.class );
	IMMUNITIES.add( Terror.class );
	IMMUNITIES.add( Sleep.class );
	IMMUNITIES.add( Bleeding.class );
}
 

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

示例6: DM300

点赞 3

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的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

示例7: attackProc

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
@Override
public int attackProc( Char enemy, int damage ) {
	if (Random.Int( 2 ) == 0) {
		Buff.affect( enemy, Bleeding.class ).set( damage );
	}
	
	return damage;
}
 

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

示例8: trigger

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
public static void trigger( int pos, Char c ) {
	
	if (c != null) {
		int damage = Math.max( 0,  (Dungeon.depth + 3) - Random.IntRange( 0, c.dr() / 2 ) );
		Buff.affect( c, Bleeding.class ).set( damage );
		Buff.prolong( c, Cripple.class, Cripple.DURATION );
		Wound.hit( c );
	} else {
		Wound.hit( pos );
	}
	
}
 

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

示例9: execute

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
@Override
public void execute( Hero hero, String action ) {
	
	super.execute( hero, action );
	
	if (action.equals( AC_EAT )) {
		
		switch (Random.Int( 5 )) {
		case 0:
			GLog.i( "You see your hands turn invisible!" );
			Buff.affect( hero, Invisibility.class, Invisibility.DURATION );
			break;
		case 1:
			GLog.i( "You feel your skin hardens!" );
			Buff.affect( hero, Barkskin.class ).level( hero.HT / 4 );
			break;
		case 2:
			GLog.i( "Refreshing!" );
			Buff.detach( hero, Poison.class );
			Buff.detach( hero, Cripple.class );
			Buff.detach( hero, Weakness.class );
			Buff.detach( hero, Bleeding.class );
			break;
		case 3:
			GLog.i( "You feel better!" );
			if (hero.HP < hero.HT) {
				hero.HP = Math.min( hero.HP + hero.HT / 4, hero.HT );
				hero.sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
			}
			break;
		}
	}
}
 

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

示例10: heal

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
public static void heal( Hero hero ) {
	
	hero.HP = hero.HT;
	Buff.detach( hero, Poison.class );
	Buff.detach( hero, Cripple.class );
	Buff.detach( hero, Weakness.class );
	Buff.detach( hero, Bleeding.class );
	
	hero.sprite.emitter().start( Speck.factory( Speck.HEALING ), 0.4f, 4 );
}
 

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

示例11: adjustStats

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
public void adjustStats(int depth) {
	kind = Math.min(depth/5, 4);
	
	hp(ht(depth * 10 + 1));
	defenseSkill = depth / 2 + 1;
	exp = depth + 1;
	maxLvl = depth + 2;
	
	IMMUNITIES.add(Roots.class);
	IMMUNITIES.add(Paralysis.class);
	IMMUNITIES.add(ToxicGas.class);
	IMMUNITIES.add(Fire.class);
	IMMUNITIES.add(Bleeding.class);
}
 

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

示例12: adjustStats

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
public void adjustStats(int depth) {
	kind = Math.min(depth/5, 4);
	if ( kind > 5 ) { kind = 5; }

	hp(ht(depth * 5 + 1));
	defenseSkill = depth * 2 + 1;
	exp = depth + 1;
	maxLvl = depth + 2;
	
	IMMUNITIES.add( Frost.class );
	IMMUNITIES.add( ScrollOfPsionicBlast.class );
	IMMUNITIES.add( Bleeding.class );
}
 

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

示例13: attackProc

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
@Override
public int attackProc(@NonNull Char enemy, int damage ) {
	if (Random.Int( 2 ) == 0) {
		Buff.affect( enemy, Bleeding.class ).set( damage );
	}
	
	return damage;
}
 

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

示例14: trigger

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
public static void trigger( int pos, @Nullable Char c ) {
	
	if (c != null) {
		int damage = Math.max( 0,  (Dungeon.depth + 3) - Random.IntRange( 0, c.dr() / 2 ) );
		Buff.affect( c, Bleeding.class ).set( damage );
		Buff.prolong( c, Cripple.class, Cripple.DURATION );
		Wound.hit( c );
	} else {
		Wound.hit( pos );
	}
}
 

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

示例15: execute

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
@Override
public void execute( Hero hero, String action ) {
	
	super.execute( hero, action );
	
	if (action.equals( AC_EAT )) {
		
		switch (Random.Int( 5 )) {
		case 0:
			GLog.i(Game.getVar(R.string.FrozenCarpaccio_Info1));
			Buff.affect( hero, Invisibility.class, Invisibility.DURATION );
			break;
		case 1:
			GLog.i(Game.getVar(R.string.FrozenCarpaccio_Info2));
			Buff.affect( hero, Barkskin.class ).level( hero.ht() / 4 );
			break;
		case 2:
			GLog.i(Game.getVar(R.string.FrozenCarpaccio_Info3));
			Buff.detach( hero, Poison.class );
			Buff.detach( hero, Cripple.class );
			Buff.detach( hero, Weakness.class );
			Buff.detach( hero, Bleeding.class );
			break;
		case 3:
			GLog.i(Game.getVar(R.string.FrozenCarpaccio_Info4));
			if (hero.hp() < hero.ht()) {
				hero.hp(Math.min( hero.hp() + hero.ht() / 4, hero.ht() ));
				hero.getSprite().emitter().burst( Speck.factory( Speck.HEALING ), 1 );
			}
			break;
		}
	}
}
 

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

示例16: heal

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
public static void heal( Char ch, float portion ) {

		ch.hp((int) Math.min(ch.ht(),ch.hp()+ch.ht()*portion));
		Buff.detach( ch, Poison.class );
		Buff.detach( ch, Cripple.class );
		Buff.detach( ch, Weakness.class );
		Buff.detach( ch, Bleeding.class );
		
		ch.getSprite().emitter().start( Speck.factory( Speck.HEALING ), 0.4f, 4 );
	}
 

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

示例17: add

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
@Override
public void add( Buff buff ) {
	super.add( buff );
	
	if (sprite != null) {
		if (buff instanceof Burning) {
			GLog.w( "You catch fire!" );
			interrupt();
		} else if (buff instanceof Paralysis) {
			GLog.w( "You are paralysed!" );
			interrupt();
		} else if (buff instanceof Poison) {
			GLog.w( "You are poisoned!" );
			interrupt();
		} else if (buff instanceof Ooze) {
			GLog.w( "Caustic ooze eats your flesh. Wash away it!" );
		} else if (buff instanceof Roots) {
			GLog.w( "You can't move!" );
		} else if (buff instanceof Weakness) {
			GLog.w( "You feel weakened!" );
		} else if (buff instanceof Blindness) {
			GLog.w( "You are blinded!" );
		} else if (buff instanceof Fury) {
			GLog.w( "You become furious!" );
			sprite.showStatus( CharSprite.POSITIVE, "furious" );
		} else if (buff instanceof Charm) {
			GLog.w( "You are charmed!" );
		}  else if (buff instanceof Cripple) {
			GLog.w( "You are crippled!" );
		} else if (buff instanceof Bleeding) {
			GLog.w( "You are bleeding!" );
		} else if (buff instanceof Vertigo) {
			GLog.w( "Everything is spinning around you!" );
			interrupt();
		}
		
		else if (buff instanceof Light) {
			sprite.add( CharSprite.State.ILLUMINATED );
		}
	}
	
	BuffIndicator.refreshHero();
}
 

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

示例18: proc

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
@Override
public void proc( Char attacker, Char defender, int damage ) {
	super.proc( attacker, defender, damage );
	Buff.affect( defender, Bleeding.class ).set( damage );
}
 

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

示例19: add

点赞 2

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
@Override
public void add(Buff buff) {
	super.add(buff);

	if (!GameScene.isSceneReady()) {
		return;
	}

	if (buff instanceof Burning) {
		GLog.w(Game.getVar(R.string.Hero_StaBurning));
		interrupt();
	} else if (buff instanceof Paralysis) {
		GLog.w(Game.getVar(R.string.Hero_StaParalysis));
		interrupt();
	} else if (buff instanceof Poison) {
		GLog.w(Game.getVar(R.string.Hero_StaPoison));
		interrupt();
	} else if (buff instanceof Ooze) {
		GLog.w(Game.getVar(R.string.Hero_StaOoze));
	} else if (buff instanceof Roots) {
		GLog.w(Game.getVar(R.string.Hero_StaRoots));
	} else if (buff instanceof Weakness) {
		GLog.w(Game.getVar(R.string.Hero_StaWeakness));
	} else if (buff instanceof Blindness) {
		GLog.w(Game.getVar(R.string.Hero_StaBlindness));
	} else if (buff instanceof Fury) {
		GLog.w(Game.getVar(R.string.Hero_StaFury));
		getSprite().showStatus(CharSprite.POSITIVE, Game.getVar(R.string.Hero_StaFurious));
	} else if (buff instanceof Charm) {
		GLog.w(Game.getVar(R.string.Hero_StaCharm));
	} else if (buff instanceof Cripple) {
		GLog.w(Game.getVar(R.string.Hero_StaCripple));
	} else if (buff instanceof Bleeding) {
		GLog.w(Game.getVar(R.string.Hero_StaBleeding));
	} else if (buff instanceof Vertigo) {
		GLog.w(Game.getVar(R.string.Hero_StaVertigo));
		interrupt();
	}

	BuffIndicator.refreshHero();
}
 

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

示例20: AirElemental

点赞 1

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
public AirElemental() {

		adjustStats(Dungeon.depth);

		flying = true;
		
		loot = new PotionOfLevitation();
		lootChance = 0.1f;

		IMMUNITIES.add(Bleeding.class);
	}
 

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

示例21: add

点赞 1

import com.watabou.pixeldungeon.actors.buffs.Bleeding; //导入依赖的package包/类
public void add( Buff buff ) {
	
	buffs.add( buff );
	Actor.add( buff );
	
	if (sprite != null) {
		if (buff instanceof Poison) {
			
			CellEmitter.center( pos ).burst( PoisonParticle.SPLASH, 5 );
			sprite.showStatus( CharSprite.NEGATIVE, "poisoned" );
			
		} else if (buff instanceof Amok) {
			
			sprite.showStatus( CharSprite.NEGATIVE, "amok" );

		} else if (buff instanceof Slow) {

			sprite.showStatus( CharSprite.NEGATIVE, "slowed" );
			
		} else if (buff instanceof MindVision) {
			
			sprite.showStatus( CharSprite.POSITIVE, "mind" );
			sprite.showStatus( CharSprite.POSITIVE, "vision" );
			
		} else if (buff instanceof Paralysis) {

			sprite.add( CharSprite.State.PARALYSED );
			sprite.showStatus( CharSprite.NEGATIVE, "paralysed" );
			
		} else if (buff instanceof Terror) {
			
			sprite.showStatus( CharSprite.NEGATIVE, "frightened" );
			
		} else if (buff instanceof Roots) {
			
			sprite.showStatus( CharSprite.NEGATIVE, "rooted" );
			
		} else if (buff instanceof Cripple) {

			sprite.showStatus( CharSprite.NEGATIVE, "crippled" );
			
		} else if (buff instanceof Bleeding) {

			sprite.showStatus( CharSprite.NEGATIVE, "bleeding" );
			
		} else if (buff instanceof Vertigo) {

			sprite.showStatus( CharSprite.NEGATIVE, "dizzy" );
			
		} else if (buff instanceof Sleep) {
			sprite.idle();
		}
		
		  else if (buff instanceof Burning) {
			sprite.add( CharSprite.State.BURNING );
		} else if (buff instanceof Levitation) {
			sprite.add( CharSprite.State.LEVITATING );
		} else if (buff instanceof Frost) {
			sprite.add( CharSprite.State.FROZEN );
		} else if (buff instanceof Invisibility) {
			if (!(buff instanceof Shadows)) {
				sprite.showStatus( CharSprite.POSITIVE, "invisible" );
			}
			sprite.add( CharSprite.State.INVISIBLE );
		}
	}
}
 

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


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