Game-Xomb
view release on metacpan or search on metacpan
lib/Game/Xomb.pm view on Meta::CPAN
# that acid pond that they are in:
# "Yes, we really hate players, damn their guts."
# -- Dungeon Crawl Stone Soup, cloud.cc
$cost += rubble_delay($ani, $cost) if $target->[SPECIES] == RUBBLE;
if ($target->[SPECIES] == HOLE) {
return MOVE_FAILED, 0
if nope_regarding('Falling may cause damage', undef,
'You decide against it.');
apply_passives($ani, $cost >> 1, 0);
log_message('You plunge down into the crevasse.');
relocate($ani, $dcol, $drow);
pkc_log_code('0099');
# KLUGE fake the source of damage as from the floor
my $src;
$src->[SPECIES] = FLOOR;
apply_damage($ani, 'falling', $src);
return MOVE_LVLDOWN, $cost;
} else {
apply_passives($ani, $cost >> 1, 0);
relocate($ani, $dcol, $drow);
apply_passives($ani, $cost >> 1, 1);
return MOVE_OKAY, $cost;
}
}
sub move_drop {
return MOVE_FAILED, 0, '0104'
if defined $Animates[HERO][LMC][VEGGIE];
return MOVE_FAILED, 0, '0112'
unless $Animates[HERO][STASH][LOOT]->@*;
lib/Game/Xomb.pm view on Meta::CPAN
show_status_bar();
}
# similar to tu'a in Lojban
sub reify {
my ($lmc, $update) = @_;
$lmc->[MINERAL] = [ $lmc->[MINERAL]->@* ];
$lmc->[MINERAL][UPDATE] = $update if defined $update;
}
sub relocate {
my ($ani, $col, $row) = @_;
my $lmc = $ani->[LMC];
my $src = $lmc->[WHERE];
my $dest_lmc = $LMap[$row][$col];
$dest_lmc->[ANIMAL] = $ani;
undef $LMap[ $src->[PROW] ][ $src->[PCOL] ][ANIMAL];
$ani->[LMC] = $dest_lmc;
lib/Game/Xomb.pm view on Meta::CPAN
=item B<refresh_board>
Redraw the level map, status bar, and previous message if any.
=item B<reify>
Marks a particular level map item (C<MINERAL>, typically) as unique,
usually so that a B<passive_msg_maker> can be applied to it.
=item B<relocate>
Handles moving the player from one level map cell to another.
=item B<replay>
Replays commands from a save game file. See also C<$RKFN>.
=item B<report_position>
Logs a message showing where the player is on the level map.
make_exactf_invlist|5.031006||Viu
make_matcher|5.027008||Viu
make_trie|5.009002||Viu
malloc|5.007002|5.007002|n
malloced_size|5.005000||nViu
malloc_good_size|5.010001||nViu
MARK|5.003007|5.003007|
markstack_grow|5.021001|5.021001|u
matcher_matches_sv|5.027008||Viu
maybe_multimagic_gv|5.019004||Viu
mayberelocate|5.015006||Viu
measure_struct|5.007003||Viu
mem_collxfrm|5.003007||dViu
_mem_collxfrm|5.025002||Viu
memEQ|5.004000|5.003007|p
memEQs|5.009005|5.003007|p
mem_log_alloc|5.024000||nViu
mem_log_common|5.010001||nViu
mem_log_free|5.024000||nViu
mem_log_realloc|5.024000||nViu
memNE|5.004000|5.003007|p
opmethod_stash|5.021007||Viu
OpMORESIB_set|5.021011|5.003007|p
OP_NAME|5.007003|5.007003|
op_null|5.007002|5.007002|
op_parent|5.025001|5.025001|n
op_prepend_elem|5.013006|5.013006|
op_refcnt_dec|||xiu
op_refcnt_inc|||xiu
op_refcnt_lock|5.009002|5.009002|u
op_refcnt_unlock|5.009002|5.009002|u
op_relocate_sv|5.021005||Viu
op_scope|5.013007|5.013007|x
OpSIBLING|5.021007|5.003007|p
op_sibling_splice|5.021002|5.021002|n
opslab_force_free|5.017002||Viu
opslab_free|5.017002||Viu
opslab_free_nopad|5.017002||Viu
op_std_init|5.015003||Viu
optimize_op|5.027006||Viu
optimize_optree|5.027006||Vi
OP_TYPE_IS|5.019007|5.019007|
( run in 0.380 second using v1.01-cache-2.11-cpan-5511b514fd6 )