1 | #! perl |
1 | #! perl |
2 | |
2 | |
3 | # this module implements the town portal spell: |
3 | # this module implements the town portal spell: |
4 | # casting it creates a magic portal to the nearest town portal (regions) |
4 | # casting it creates a magic portal to the nearest town portal (regions) |
5 | # using the magic portal brings you to the town portal and remembers your magic portal |
5 | # using the magic portal brings you to the town portal and remembers your magic portal |
6 | # using the town portal brings you back to the magic portla if it still exists |
6 | # using the town portal brings you back to the magic portal if it still exists |
7 | |
7 | |
8 | cf::object->attach ( |
8 | cf::object->attach ( |
9 | type => cf::SPELL, |
9 | type => cf::SPELL, |
10 | subtype => cf::SP_TOWN_PORTAL, |
10 | subtype => cf::SP_TOWN_PORTAL, |
11 | on_cast_spell => sub { |
11 | on_cast_spell => sub { |