Pi Day Updates

 

  • Mass Genocide was unhooking due to bad spell address (wrong realm) located in the defense call.
  • A no_rest_prep count was added to borg_brand_weapon().  He would often cast, then rest to recharge his mana.  During the rest, the branding would expire.
  • A recent change in using BORG_VIEW messed up the targetting code for vault excavation.  Borg_projectable() needed to be put back in there.
  • Added the death spell of Enslave Undead to the list of attacks.
  • Borg was looping a tiny bit on inscribing quest items.  Fixed it by erasing the quest object from the good_obj_xxx[] in borg_item_analyze().
  • The death realm vampirism spells were given a higher reward if the borg had suffered a HP loss.  This is to influence the use of the spell for its healing property.
  • Added Death Realm Orb of Entropy to the list of offset ball spells used in borg_defend_aux_rest().
  • Placed the Death Realm spell of Battle Frenzy before the Berserk spell in defense maneuvers.  BF has haste, while B does not.  It does cost a bit more mana though.
  • The ACT_MAP_LITE timeout was too long to be useful for a light source so it was removed from the list of items granting BI_ALITE.  That will cause the borg to carry a rod of illumination.
  • The borg will carry up to 2 rods of illumination but not more than two.  They are heavy and quick to recharge.
  • Borgs will not crush Rod of Illumination if they have no other source of Call Light.
  • There was some minimal shop-looping with wands and staffs (probably due to the pval).  So the list of recently purchased items will handle wands/staff differently.
  • When in Berserker Mode, the borg wont be able to ‘push past’ pets, so he will not be allowed to flow through them.
  • Improvements to how the borg calculates the value of charming monsters.  The value increases if other monsters are near the to-be-charmed monster.
  • I had to add a couple of pain messages that were missing (“is immune!” and “resists!”) and one kill message (“evaporates!”)
  • GF_DEATH_RAY is virtually harmless to uniques.
  • Added a BI_AGENOCIDE and will use to when deciding whether or not to flee the level due to out-numbered nasties.
  • Reordered the use of death realm mass genocide and omnicide.
  • Mass genocide and omnicide will also remove all regional fear after they are cast. Regional fear is induced from non-seen monsters and they would have been killed by the use of the spell.
  • Before casting Mass Genocide, borg will make sure he has a recent Detect Evil cast or at least ESP.  This way he will have a better idea of how many monsters are going to be affected, and thereby correctly estimate the amount of damage he will take.
  • Added more support for the death realm and use of Esoteria.
  • Vampiric drain spell will be given a higher reward if the borg is hungry or weak since it provides nutrition.  It also counts as BI_AFOOD.
  • I reduced some of the swap armor bonuses that relate to damage calculation.  Those values tended to skew the results and make carrying a heavy swap armor a good idea.
  • The 3 invulnerability spells change the colors of the items and monsters (white and dark grey) so the borg should ignore the color change when examining the screen for new objects in observe_take_move().
  • Added support for being stuck in a wall at the end of Wraith_form and how to manage that.  borg_flow_passwall()
Posted in Zangband 240 | Tagged , , , , , | Leave a comment

Major Sea of Runes work

I have been running a Sorcery/Nature guy.  I have made some improvement to the spell use for those realms.  I also made a serious overhaul to the Sea of Runes routines.

  • Added a cost to the racial attacks and the cost is greater if he’s lower on mana or HP.
  • Reordered and reworked the defence routine of summoning helpers.  Its now more depth dependant.  It was futile to summon a red centipede on dungeon depth 45.
  •  Added a cost to the mutation and racial attacks.  This cost will reduce the reward for using the effect.
  •  Added a check in borg_launch_damage_one() which will eliminate using extremely low damage attacks against a powerful enemy.  Ie, no long will the borg use a damage 5 offset-ball attack against a creature with 2800 HP.
  •  Added the other sorcery source of ESP to the borg_perma maneuvers as well as granting the BI_SESP (source of ESP] flag to spells so the borg could dive deeper.  This source is checked in the borg_prep code.  Also added a BI_SSINV as a source from spells.
  •  Allowed the tracking of unique monsters over a greater distance so as to avoid creating multiple instances of them.
  •  Removed the code that deleted a monster if it didn’t move during its turn (borg_follow_kill())
  •  Borg_escape() will try to forbid teleporting if the borg is in an as_corridor and fighting a unique.
  •  Rework on borg_follow_kill() which attempts to guess the current grid of a monster that is now not visable.
  •  No need to flow to a recover grid if sitting in an as_corridor.  Its as safe as anything else.
  •  Attempt to use borg_recover() if sitting in a as_corridor, prior to leaving it.  There is a reason why we were there.  Lets heal up before venturing out.
  •  Borg_attack_aux_rest() needed a time check to make sure the borg didn’t wait ad nauseam.
  •  Better DimDoor support added to certain flow routines and made the borg_dim_door_to() more useful to other routines who borrow it.
  •  Borg_kills_summoner will be linked to the flow distance for a summoner instead of normal distance().  Change made in borg_near_monster_type()
  •  Rework the monster flow depth to be based on the compilier flag of MONSTER_FLOW and the tuned for individual races (r_ptr->aaf).  Also added some support into borg_near_monster_type() for the flag borg_kills_summoner.  I also reworked the flow_spread_m() to more closely match the game’s internal calculation.  The result is really nice.
  •  Extensive rework the BORG_VIEW array in order to reduce the number of calls to borg_los().
  •  Added support for magical figurines being thown as weapons and kept in the inventory.
  •  Fixed a crash in borg_think_home_sell_aux().
  •  Backing up (from borg_caution()) will grant a more favorable result to a grid which is occupied by a pet.  The will swap places with the pet and throw it under bus.  He already knew how to use the mutation of swap position but not a manual displacement.
  •  Borg will not purchase (grab for home) mundane equipment. If can find those in the dungeon.
  •  The ‘bored’ flag in borg_leave_level is made false if the borg is fighting a questor monster.
  •  Added the Nature spell of Explosive Rune to the functions calling runes.
  •  Tweaked with the defense maneuver for speed to encourage the borg to cast it if questor or uniques were on the level.
  •  bool DEPTH_QUEST_level was always set to false, but I added support to keep it accurate.
  •  Resequenced the teleport other sources to as to conserve mana and use up charges first.
  •  Slight bug fix on calculating targets of Teleport Other.
  •  borg_fear_region[y][x] will reduce more quickly.
  •  Added a flag called BI_NSRANGED, which is a ‘Non-Spell Ranged Attack.’  It is used in teleporting away monsters while in a sea of runes.
  •  Water and Lava will no longer be considered vison blocking layers like doors and walls.
  •  The Nature Realm spell of Whirlwind attack needed to check if an adjacent monster was a pet or friendly.
  •  Borg_check_rest() would look for pets/friendlies when considering the rest.  But he was doing so after a check for breeders.  The ally check was moved higher so that the borg would be allowed to rest near a friendly/ally breeder.
  • The borg tracks when breeders are killed.  He does this so he does not rest next to an unexplored area full of unknown breeders.  But I added a check to avoid this check if the breeder was a pet.  This way, he can rest if a breeder was recently killed.
  •  Borg will not recall back to town to fix his XP if the dlevel has (morgoth | quest)
  •  Some interesting improvements to the Sea of Runes behavior:
    •  Borg will use it when he encounters questors who can bore through walls.
    •  Once the sea is fully set up, he will continue excavate the regional dungeon using S2M in order to increase the number of shots on the tunneling monster.
    •  Will use Light Beam to illuminate the recently excavated grid so he no longer assumes that it is a wall grid (which would have limited his LOS() and shots).
    •  Will rest there as a defence maneuver and as an attack maneuver in order to correctly make normal attacks and wait for monsters to approach.
    •  Will wait about 500 rounds for tunneling to approach.  If not seen then he goes on the hunt and behaves normally.
    •  Will use Teleport Other to get others away from the area he is trying to use for a Sea of Runes.
    •  Can excavate an area and build the see instead of having to find a room with the right dimensions.
    •  Can wait for a bit, then leave the sea to go hunt around.
    •  Can return to the existing sea or build a new one following the hunt.
    •  Will create a 5×5 or 3×3 grid based on how affordable the glyph spell is.
    •  The borg will consider the terrain when using Teleport Other spell.  Since some monsters are not able to cross certain terrains, they are less of a threat.
  •  I added several bitwise flags to the borg code to manage his special position behavior and special questor/unique monster appearances.
  •  Improved the use of the perma-spell of resistance.  He was still casting it, even though he had 3 immunities.

 

Posted in Zangband 240 | Tagged , , | Leave a comment

February Improvements

    • Fixed a problem with wearing swap items. Sometimes, the borg might lose a critical skill (Free Action) when switching to a swap item.
    • There had been some crashes reported with using Windows 8 and using the ‘~’ knowledge menus. Its related to permissions in creating files.
    • There were crashes in the Self Knowledge object. The game was encountering an error in self_knowledge() at line 88, which read: strcpy(v_name, virtue[(p_ptr->vir_types[v_nr])-1]); Strangely, this was a [-1] error.  I never encountered it prior to using windows 8 and MSVS2012.  So it may be related to the IDE.
    • The borg needed support to know if he was in the self knowledge screen and to escape out of it.
    • Borg was having a little issue with borg_wear_swap() and wanting to remove important gear.
    • Improved the routine which allowed him to swap in items to do more damage.
    • Problem with the chaos spell of Meteor Swarm.
      • The do…while loop was processing the reverse of what it should (the out-of-bounds were allowed to pass instead of being sent back into the block). This lead to crashes when the spell was cast near the border of the dungeon.
      • The old logic forced meteors to land on grids 5 spaces away, which forced them to land in corner relative to the player. That was repaired.
    • Chaos spell of Meteor Swarm needed a little better support for targetting and correctly adding up possible damage. It is a handy spell while in a hallway.
Posted in Zangband 240 | Tagged , , , , | Leave a comment

January 2014 Zborg

I received some great savefiles showing some errors and had a chance to work on them.  Here is the result:

  • Added a few more ego item types to the list of items that should be *ID*’d, since some items can have extra powers and resists.  The ones added were slay and kill dragon, might, power, & lordliness.
  • The defense maneuver of detect_invis() was missing the sorcery spell of Sense Minds in the defense activation.
  • Aesthetic fix to the layout of the ^zd Spell Dump output.
  • Improvement to how the borg was calculating the benefits of using Teleport Other on large groups of monsters which can create a lot of danger.
  • There was a ‘drop off potions’ loop.  The borg was heading to town but not dropping off the potions in the house.
  • Borg was over confident in his ability to tunnel.  There is a definition of BORG_DIG which is his digging skill.  I was moved from 20 to 40 to make sure the borg didn’t waste too much time trying to dig improbable tunnels.  Granite has a dig factor of skill_dig > 40 +rnd(1600).  So even with a BORG_DIG of 40, and no digger, he is still likely to dig.  This value might be adjusted higher (to 60)
  • The borg found a really nice artifact broken dagger.  The  bonuses of the randart attributes out-weighed the penalty of wielding one.  So i boosted the penalties for melee type characters.  The non-melee characters can still wield these items with the old penalty.
  • Borg_flow_vault() was missing a borg_flow_clear() object.  This lack caused the borg to think that he could dig tunnels all day long.
  • Borg was incorrectly parsing the staff charges of “3 Staffs of Foo (3x 4 charges).”  He thought he only had 4 charges instead of 12.
  • The borg was over-rewarding the value of certain activations.  The error was related to the scanning of equipment in borg_power_aux3() and looping a reward.
  • The borg was ignoring ‘The Greater hell magic mushroom were-quylthulg’ when should only be ignoring ‘The greater hell-beast.’
  • Added support for GF_STUN and GF_TURN_EVIL in borg_launch_damage_one().  I made sure the GF_STUN is not considered valuable if the monster is compromised from some other effect (confused, afraid).
  • Amberites were having trouble with mutation activations.  The borg had the wrong address for his mutations (b instead of c).
  • Added better support for Amberite racial activations including a borg_recover() check for hallucination.
  • The borg needed to weigh the benefits of casting Brand Weapon.  Some are very expensive in terms of mana.  The no_melee guys won’t bother with casting it.  He also needed to make sure he didn’t cast/rest loop.
  • Some improvements and clean-ups to how the borg works with dispel spells with varying AoE radius.

 

Posted in Zangband 240 | Tagged , , , , | Leave a comment

New Years Eve

  • Borg needed to not remove an empty lantern from the equipment.  It interfered with him buying fuel.  Additionally, he needed some support for buying fuel for the empty lantern.  His inclination was to buy a new lantern.  Since fuel is cheaper, its better for him to buy fuel for the empty lantern.
  • Now that the summoning spells have support, I am removing the ‘icky’ tag associated with certain spells.  Today was the Nature Realms summon.
  • The borg might loop onto an empty grid which was previously a vein grid.
  • The borg will now quaff a potion while junking junk, if the potion wont harm him.  He can gain any bonus effect or nourishment (albeit small on both accounts).  A check was applied in borg_quaff_potion() to make sure he doesn’t drink something nasty.
  • Potential for the borg to loop trying to wear a cursed spell book, thinking he can decurse it.
  • Encumbered borgs will no longer unequip their gear.  They tend to crush it.
  • Skeletons will not borg_consume() food items as a means to crush or destroy them since they just fall to the floor.
  • Staffs and wands needed to have a distinction between identified and aware.  It helps with recharging at the special shop.
  • Borg wont use the Recharge spell on rods while in munchkin mode.  The rods tend to recharge faster than the mana spent on the spell.
  • Borg will now increase his ‘leash’ (based on clevel) when flowing to the takes in munchkin mode.  This will allow him to chase down his arrows.
  • Added a cascade reward for using the rods as weapons.  He used to carry up to 10 rods, sometimes even up to 9 Rod of Light.  Really, he doesn’t need more than 5 of them.  So he will limit the number of rod quantities in order to make more efficient use of inventory space.
  • There were a couple of places where Stone to Mud from Nature Realm was missing from the spell lists.  This caused the borg to miss a few spells chances and to carry digger.
Posted in Zangband 240 | Tagged , , , | Leave a comment

Christmas Eve 2014

Merry Christmas!  I have a nice Zborg update with lots of improvements.

  • Slight correction to the stair scum use.  The borg was leaving the munchkin mode if he were 1 step away from the stair.
  • Borg needed to know that activating cursed items is 3x harder than non-cursed ones.
  • The Death spell of Invoke Spirits needed to be listed as icky, and not attempted since it has random results (some of which require targeting)
  • The defense maneuver 0 (calling speed) had the potential to stall the borg if the allow_fail was altered.
  • A borg with no light and no cash could become twitchy in town.  He will be allowed to sell some items  (which he would not normally like to sell) in order to raise cash to buy torches/oil.
  • The borg could possibly hang while considering the casting of Divine Intervention.
  • Divine Intervention Life Realm had a bad spell address from the defense call.
  • Reworked the ego ammo a bit to clean up the code.
  • Questor monsters were added to the uniques with respect to adding damage in damage_one().  This will influence the borg to select Questor monsters for combat.
  • The borg was at the Paladin Guild trying to enchant his swap ring.
  • Solved a Twitchy issue by adding a prep_check flag to the borg_flow_stair_more().  If false, it will ignore the basic preparation checks before taking a down stair.
  • Added an anti-‘cast Detection/rest’ loop by adding a mana check.
  • Nature’s Awareness was being cast multiple times in a row.  Once for each type of detection.
  • Borg was looping a bit while flowing to a take.  He would retreat one step then re-attempt the flow path.  The retreat function from borg_caution wont be used if the goal == GOAL_TAKE
  • Some cursed artifacts were not being junked in the dungeon because they had some nice high resists which the borg was lacking. But having that resistance was not worth carrying the item.  He is allowed to check the value of junk items before junking them.
  • Slight change to the munchkin mode to help him dive better without being subject to the restock() restrictions.
  • Monks were trying to dig unarmed.  So I added special considerations for the monks to carry diggers.  But that required special handling of the borg_wear_stuff() to allow him to remove the digger and return to being an unarmed monk.
  • Borgs in vanilla_town mode were not storing items in their home correctly.  Vanilla town is town_num 1, which is also the Outpost in the Zangband wilderness.  And the borg does not shop or store items the same way in the Outpost.  The borg will move to the town north of the Outpost at about clevel 12.  So items don’t get stored in the Outpost Home.
  • The Arcane spell of Elemental Ball had the wrong spell address in the attack routine.
  • Zangband provides skill bonuses to players for using weapons of certain mass.  These are in xtra1.c.  These bonuses were taught to the borg.  So he can consider them when choosing his weapons.
  • The borg was not calculating his ‘member discount’ correctly at the temple.  Restoration can cost either $100 or $500.  Rather than have the borg do the calculating, I just told him to have the $500.
  • The arcane spell of See Invis had the wrong address in borg4.c
  • The defense maneuver of See Invis needed better handling and ordering the duration spells before the snap-shot spells.
  • The Nature realm spell of Whirlpool was added to the list of nice offset-ball attacks in the borg_defend_aux_rest() object.
  • The borg_prep requirement for See_Inv or ESP for depth 9 is lifted if the borg clevel >= 30.

 

 

Posted in Zangband 240 | Tagged , , , , , , , | Leave a comment

December 2014

 

  • Borg wont set explosive runes/runes of protection when fighting a guy who can use Teleport-to.  These guys can bampf the borg off the rune.

 

  • When considering which items to crush (slow/hole/junk), the borg will skip items which contain a high resist which the borg is currently lacking.

 

  • Added Lord of Change and Shoggoth to a list of Nasties.  If too many of them are on a level, then the borg will flee the level.  Added a new teleport level check in borg_escape() to flee in just this case.

 

  • Monsters with teleport spell can follow the player through his own phase or teleport.  That’s very dangerous to the borg.  He will consider these guys dangerous if they are 3 (or fewer) grids away in distance.

 

  • Borg_crush_slow() will now not crush Rods of Teleport Other.  The other two borg_crush_xxx() already saved these rods.  Similarly, the borg will not sell a Rod of Teleport Other to the shop unless he has more than 5 of them.

 

  • There was a bug in the the defence maneuvers involving Teleport Other and the rods/wands.  The object being called was only looking at equipment (and skipping inventory) for a rod.  Obviously, no rods/wands are present in the equipment list.

 

  • Some repairs to how the borg respawns while in Vanilla Town mode.  It had been crashing.

 

Posted in Zangband 240 | Tagged , | Leave a comment

November 2014 Updates

  • I created a borg_surround_breeder() and an escape for when the borg is surrounded by breeders.  He will use Teleport to get away from breeders.
  • The borg needed to lighten the requirement for RPois to include the resistance offered through reliable spells.  This allows him to free up that equipment slot requirement.
  • Borg will not cast CLW or CSW if his HP are down more than what the spell can cure, and there is some danger.  We don’t want him casting low levels cures while adjacent monsters beat on him.
  • Slight change to how the borg will ‘grab’ things:
    • Borg wont grab spell books from the shops to store in the house.  He will still store extra books, but won’t by the books.
    • Borg won’t grab weapons from the shops to store in the home.  He has plenty of those in the dungeon.
    • Borg won’t grab non-potion/scroll things after reaching clevel 50.

‘Grabbing’ is when the borg will see an item in the shop and determine that it will make a nice addition to his house inventory.

 

Posted in Zangband 240 | Tagged , , | Leave a comment

June 2014 Updates

  • The borg needed another check in the munchkin mode with using Create Stair spell. He was missing some opportunities when trying to get back down deep.
  • The Summon Friendly Monster spells needed to check for a free grid adjacent to the borg; one on which a monster could be placed.
  • Added a couple of items to the ‘do-not-eat’ list for Eat Magic.
  • borg will use Teleport Level to escape a level 1 danger if on a depth with >= 10 summoners.
  • I modified the game code to incorporate the following: If a non-smart monster is being attacked by a pet/friendly and that attacker is closer to the monster than the borg, then the monster will attack that pet/friendly.
  • The borg will reduce his fear of an area if he has pets/friendlies near by.
  • Added a quantity note to the borg’s buying report. He will tell of how many of the ‘xx items’ he wants from the store.
  • He will only do the ring swap (with nasty and tight rings) once per level.
  • Added one more check to avoid buying and selling loops to the home.
Posted in Zangband 240 | Tagged , , | Leave a comment

March 2014 Updates

I am still running a half-ogre Life/Nature borg.  He is playing cautiously at dlevel 37 and clevel 42

  • Added support for the rest of the randart activations (charm and summons).  Charms are attacks and summons are defense maneuvers.
  • Fixed an error in the game code that kept eat_magic() from working on rods.
  • Extended the CHARM_XP code to include the other two forms of control.
  • Summon a pet as a defense maneuver when surrounded by guys.
  • Added the Trump realm summons to the defense check on summoning a pet.
  • Added the Half-Ogre race activation to glyph formation.
  • Speed up the borg by adding a kill->dist so the borg does not have to keep calculating distance(c_y, c_x, kill->y, kill->x)
  • When crushing junks, borg should look at eat_magic to regain mana before dumping the item.
  • I needed to replace some hard-coded K_IDX numbers.
  • The borg learned some extra qualities to certain curing potions (removing confusion and blindness).  Doing so enables him to be rewarded for carrying those items for that specific property.
  • The borg will have reduced fear of confusion and blindness attacks if he has at least two items which can cure him.  Previously, he needed to have resistance to blindness or confusion to avoid the fear.
  • Player ghosts were being assumed when it should have been a friendly or pet.
  • In an effort to dive deeper and play at his maximal safe-depth, he will use the munchkin mode and scum the stairs more.
  • Defense was calling Nature spell of Stair Building instead of Resist Corrosion.
  • The borg might bounce on a few munchkin levels for several thousand turns waiting for a restock() item to show up (depth 5 & 6).  I tied the climbing to the borg_leave_level() flag of goal rising, that way he is inclined to complete a journey.
  • I taught the borg to use Create Stairs while he is in munchkin mode.
  • The borg would use the Eat Magic mutation in borg_heal().  I moved it to borg_recover().
  • borg_cave_floor_bold() need to have FEAT_OPEN added to the list.
  • borg_defend_lightbeam() was not considering 3-way intersections as a possibility.
  • I had to smooth out the AC reward for no_melee guys with AC near 75.  It was inducing a shop-wear-sell-loop.
  • Nature Realm added to the list of characters who can have more than 3 pets.  Dismissing pets is a defence maneuver and it is called if too many pets are found.
Posted in Zangband 240 | Tagged , , , , | Leave a comment