Skip to content

Commit

Permalink
Improved hologram behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Candlebury committed Jan 7, 2020
1 parent 91c47b0 commit 5ca8b1b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 5 additions & 5 deletions data/json/monsters/monsters.json
Original file line number Diff line number Diff line change
Expand Up @@ -1552,18 +1552,18 @@
"volume": "62500 ml",
"weight": "81500 g",
"hp": 1,
"speed": 150,
"speed": 130,
"symbol": "@",
"color": "cyan",
"aggression": -99,
"morale": 2,
"morale": 99,
"luminance": 16,
"dodge": 6,
"dodge": 10,
"harvest": "exempt",
"fear_triggers": [ "PLAYER_CLOSE" ],
"special_attacks": [ [ "DISAPPEAR", 200 ] ],
"death_function": [ "DISAPPEAR" ],
"flags": [ "FLIES", "NO_BREATHE", "NOT_HALLUCINATION", "HARDTOSHOOT" ]
"path_settings": { "max_dist": 30 },
"flags": [ "FLIES", "NO_BREATHE", "HARDTOSHOOT", "PET_WONT_FOLLOW" ]
},
{
"id": "mon_homunculus",
Expand Down
8 changes: 6 additions & 2 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9160,8 +9160,12 @@ int iuse::directional_hologram( player *p, item *it, bool, const tripoint &pos )
return 0;
}
tripoint target = pos;
target.x = p->posx() + 2 * SEEX * ( posp.x - p->posx() );
target.y = p->posy() + 2 * SEEY * ( posp.y - p->posy() );
target.x = p->posx() + 4 * SEEX * ( posp.x - p->posx() );
target.y = p->posy() + 4 * SEEY * ( posp.y - p->posy() );
hologram->friendly = -1;
hologram->add_effect( effect_docile, 1_hours );
hologram->wandf = -30;
hologram->set_summon_time( 60_seconds );
hologram->set_dest( target );
p->mod_moves( -to_turns<int>( 1_seconds ) );
return it->type->charges_to_use();
Expand Down

0 comments on commit 5ca8b1b

Please sign in to comment.