Package civquest.map.mapobj

Examples of civquest.map.mapobj.Attacking


    defAttackers = new HashMap<Attacking, AttMapObjectInfo>();
    Iterator<Attacking> defAttIterator
      = defenderField.getAttackingIterator();
    while (defAttIterator.hasNext()) {
      Attacking def = defAttIterator.next();
      if (true) {
//       if (defObj.getAttackManager().shootBack(attAttackers.keySet(),
//                           attackerFieldPos)) {
//         int time = def.getTime();
        AttMapObjectInfo info = new AttMapObjectInfo(0);
View Full Code Here


    AttackInfo attackInfo = getNextAttackInfo();

    if (attackInfo == null) {
      return false;
    } else {
      Attacking attacker = attackInfo.attacker;
      int time = attackInfo.time;
      Field target = attackInfo.target;

//       DamagableMapObject target = attackManager.getTarget(weapon, damagables);
//       Damage damage = weapon.getDamage();

      ShotResults shotResults = attacker.calculateAttack();
      Damage[] damages = shotResults.getDamage();
      for (Damage damage : damages) {
        List<GameChange> shotChanges = shotResults.getChanges();
        List<GameChange> receiveChanges = damageManager.damage(target, damage);
        List<GameChange> timeChanges = computeTimeChanges(attacker, time);

        if (attacker instanceof Unit) {
          UnitShot unitShot = new UnitShot(attacker.getID(), shotChanges,
                           damage, target.getPosition(),
                           damageManager, receiveChanges,
                           timeChanges);
          unitShot.execute();
        } else {
View Full Code Here

TOP

Related Classes of civquest.map.mapobj.Attacking

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.