当前位置: 首页>>代码示例>>Java>>正文


Java Paralysis类代码示例

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


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

示例1: evolve

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
protected void evolve() {
	super.evolve();

	Char ch;
	int cell;

	for (int i = area.left; i < area.right; i++){
		for (int j = area.top; j < area.bottom; j++){
			cell = i + j*Dungeon.level.width();
			if (cur[cell] > 0 && (ch = Actor.findChar( cell )) != null) {
				if (!ch.immunities().contains(this.getClass()))
					Buff.prolong( ch, Paralysis.class, Paralysis.duration( ch )/5 );
			}
		}
	}
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:18,代码来源:StenchGas.java

示例2: evolve

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
protected void evolve() {
	super.evolve();
	
	Char ch;
	int cell;

	for (int i = area.left; i < area.right; i++) {
		for (int j = area.top; j < area.bottom; j++) {
			cell = i + j * Dungeon.level.width();
			if (cur[cell] > 0 && (ch = Actor.findChar(cell)) != null) {
				if (!ch.immunities().contains(this.getClass()))
					Buff.prolong(ch, Paralysis.class, Paralysis.duration(ch));
			}
		}
	}
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:18,代码来源:ParalyticGas.java

示例3: add

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
public void add( Buff buff ) {

	if (buff(TimekeepersHourglass.timeStasis.class) != null)
		return;

	super.add( buff );

	if (sprite != null) {
		String msg = buff.heroMessage();
		if (msg != null){
			GLog.w(msg);
		}

		if (buff instanceof Paralysis || buff instanceof Vertigo) {
			interrupt();
		}

	}
	
	BuffIndicator.refreshHero();
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:23,代码来源:Hero.java

示例4: effect

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
public static void effect(Hero hero){
	switch (Random.Int( 5 )) {
		case 0:
			GLog.w( Messages.get(MysteryMeat.class, "hot") );
			Buff.affect( hero, Burning.class ).reignite( hero );
			break;
		case 1:
			GLog.w( Messages.get(MysteryMeat.class, "legs") );
			Buff.prolong( hero, Roots.class, Paralysis.duration( hero ) );
			break;
		case 2:
			GLog.w( Messages.get(MysteryMeat.class, "not_well") );
			Buff.affect( hero, Poison.class ).set( Poison.durationFactor( hero ) * hero.HT / 5 );
			break;
		case 3:
			GLog.w( Messages.get(MysteryMeat.class, "stuffed") );
			Buff.prolong( hero, Slow.class, Slow.duration( hero ) );
			break;
	}
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:21,代码来源:MysteryMeat.java

示例5: proc

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
public int proc( Weapon weapon, Char attacker, Char defender, int damage ) {
	// lvl 0 - 13%
	// lvl 1 - 22%
	// lvl 2 - 30%
	int level = Math.max( 0, weapon.level() );
	
	if (Random.Int( level + 8 ) >= 7) {
		
		Buff.prolong( defender, Paralysis.class, Random.Float( 1, 1.5f + level ) );
		defender.sprite.emitter().burst(Speck.factory(Speck.LIGHT), 12 );

	}

	return damage;
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:17,代码来源:Stunning.java

示例6: evolve

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
protected void evolve() {
    super.evolve();

    Char ch;
    for (int i=0; i < LENGTH; i++) {
        if (cur[i] > 0 && (ch = Actor.findChar(i)) != null) {
            if (!ch.immunities().contains(this.getClass()))
                Buff.prolong( ch, Paralysis.class, Paralysis.duration( ch )/5 );
        }
    }
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:13,代码来源:StenchGas.java

示例7: evolve

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
protected void evolve() {
	super.evolve();
	
	Char ch;
	for (int i=0; i < LENGTH; i++) {
		if (cur[i] > 0 && (ch = Actor.findChar( i )) != null) {
               if (!ch.immunities().contains(this.getClass()))
			    Buff.prolong( ch, Paralysis.class, Paralysis.duration( ch ) );
		}
	}
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:13,代码来源:ParalyticGas.java

示例8: attackProc

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
public int attackProc( Char enemy, int damage ) {
	if (Random.Int( MAX_ARMY_SIZE ) == 0) {
		Buff.prolong( enemy, Paralysis.class, 1 );
	}
	
	return damage;
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:9,代码来源:King.java

示例9: attackProc

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
public int attackProc( Char enemy, int damage ) {
	if (Random.Int( 10 ) == 0) {
		Buff.prolong( enemy, Paralysis.class, 1.1f );
	}
	return super.attackProc( enemy, damage );
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:8,代码来源:Senior.java

示例10: onSelect

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
public void onSelect( Integer target ) {
	if (target != null && target != curUser.pos) {
		
		int cell = Ballistica.cast( curUser.pos, target, false, true );
		if (Actor.findChar( cell ) != null && cell != curUser.pos) {
			cell = Ballistica.trace[Ballistica.distance - 2];
		}

              curUser.HP -= (curUser.HP / 3);
		if (curUser.subClass == HeroSubClass.BERSERKER && curUser.HP <= curUser.HT * Fury.LEVEL) {
			Buff.affect( curUser, Fury.class );
		}
		


              final int dest = cell;
              curUser.busy();
              ((HeroSprite)curUser.sprite).jump(curUser.pos, cell, new Callback() {
                  @Override
                  public void call() {
                      curUser.move(dest);
                      Dungeon.level.press(dest, curUser);
                      Dungeon.observe();

                      for (int i = 0; i < Level.NEIGHBOURS8.length; i++) {
                          Char mob = Actor.findChar(curUser.pos + Level.NEIGHBOURS8[i]);
                          if (mob != null && mob != curUser) {
                              Buff.prolong(mob, Paralysis.class, SHOCK_TIME);
                          }
                      }

                      CellEmitter.center(dest).burst(Speck.factory(Speck.DUST), 10);
                      Camera.main.shake(2, 0.5f);

                      curUser.spendAndNext(LEAP_TIME);
                  }
              });
	}
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:41,代码来源:WarriorArmor.java

示例11: execute

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的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.w( "Oh it's hot!" );
			Buff.affect( hero, Burning.class ).reignite( hero );
			break;
		case 1:
			GLog.w( "You can't feel your legs!" );
			Buff.prolong( hero, Roots.class, Paralysis.duration( hero ) );
			break;
		case 2:
			GLog.w( "You are not feeling well." );
			Buff.affect( hero, Poison.class ).set( Poison.durationFactor( hero ) * hero.HT / 5 );
			break;
		case 3:
			GLog.w( "You are stuffed." );
			Buff.prolong( hero, Slow.class, Slow.duration( hero ) );
			break;
		}
	}
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:28,代码来源:MysteryMeat.java

示例12: doRead

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
protected void doRead() {
	
	GameScene.flash( 0xFFFFFF );
	
	Sample.INSTANCE.play( Assets.SND_BLAST );
	Invisibility.dispel();
	
	for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) {
		if (Level.fieldOfView[mob.pos]) {
			mob.damage(mob.HT, this );
		}
	}

	curUser.damage(Random.IntRange(curUser.HT/4, curUser.HT/2), this);
       Buff.prolong( curUser, Paralysis.class, Random.Int( 4, 6 ) );
	Buff.prolong( curUser, Blindness.class, Random.Int( 6, 9 ) );
	Dungeon.observe();
	
	setKnown();
	
	curUser.spendAndNext( TIME_TO_READ );

       if (!curUser.isAlive()) {
           Dungeon.fail( Utils.format(ResultDescriptions.ITEM, name ));
           GLog.n("The Psionic Blast tears your mind apart...");
       }
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:29,代码来源:ScrollOfPsionicBlast.java

示例13: attackProc

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
public int attackProc( Char enemy, int damage ) {
	damage = super.attackProc( enemy, damage );
	if (Random.Int( MAX_ARMY_SIZE ) == 0) {
		Buff.prolong( enemy, Paralysis.class, 1 );
	}
	
	return damage;
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:10,代码来源:King.java

示例14: attackProc

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
public int attackProc( Char enemy, int damage ) {
	damage = super.attackProc( enemy, damage );
	if (Random.Int( 10 ) == 0) {
		Buff.prolong( enemy, Paralysis.class, 1.1f );
	}
	return super.attackProc( enemy, damage );
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:9,代码来源:Senior.java

示例15: onSelect

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; //导入依赖的package包/类
@Override
public void onSelect( Integer target ) {
	if (target != null && target != curUser.pos) {
		
		Ballistica route = new Ballistica(curUser.pos, target, Ballistica.PROJECTILE);
		int cell = route.collisionPos;

		//can't occupy the same cell as another char, so move back one.
		if (Actor.findChar( cell ) != null && cell != curUser.pos)
			cell = route.path.get(route.dist-1);


		curUser.HP -= (curUser.HP / 3);

		final int dest = cell;
		curUser.busy();
		curUser.sprite.jump(curUser.pos, cell, new Callback() {
			@Override
			public void call() {
				curUser.move(dest);
				Dungeon.level.press(dest, curUser);
				Dungeon.observe();
				GameScene.updateFog();

				for (int i = 0; i < PathFinder.NEIGHBOURS8.length; i++) {
					Char mob = Actor.findChar(curUser.pos + PathFinder.NEIGHBOURS8[i]);
					if (mob != null && mob != curUser) {
						Buff.prolong(mob, Paralysis.class, SHOCK_TIME);
					}
				}

				CellEmitter.center(dest).burst(Speck.factory(Speck.DUST), 10);
				Camera.main.shake(2, 0.5f);

				curUser.spendAndNext(LEAP_TIME);
			}
		});
	}
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:40,代码来源:WarriorArmor.java


注:本文中的com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。