Changeset 315 for veekun/trunk/lib/Vee/Schema
- Timestamp:
- 08/27/07 22:45:31 (3 years ago)
- Files:
-
- 1 modified
-
veekun/trunk/lib/Vee/Schema/Items.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
veekun/trunk/lib/Vee/Schema/Items.pm
r233 r315 10 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 11 __PACKAGE__->table("items"); 12 __PACKAGE__->add_columns(qw/ id game_id berry_id name c ost col5 hp_plus_maybe col7 col8 fling_power natural_gift_power natural_gift_type col12 col13 col14 col15 col16 col17 col18 col19 col20 col21 col22 col23 effort_hp effort_at effort_de effort_sp effort_sa effort_sd hp_restored pp_restored happiness1 happiness2 happiness3 dpblurb/);12 __PACKAGE__->add_columns(qw/ id game_id berry_id name category cost col5 hp_plus_maybe fling_power fling_effect natural_gift_power natural_gift_type col12 col13 col14 col15 col16 col17 col18 col19 col20 col21 col22 col23 effort_hp effort_at effort_de effort_sp effort_sa effort_sd hp_restored pp_restored happiness1 happiness2 happiness3 is_underground dpblurb description /); 13 13 __PACKAGE__->set_primary_key("id"); 14 14 __PACKAGE__->add_unique_constraint(["id"], undef); … … 27 27 } 28 28 29 sub sprite_name { 30 my ($self) = @_; 31 32 my $name = lc $self->name; 33 # TMs! 34 35 $name =~ tr/ /-/; 36 $name =~ tr/-a-z0-9//cd; 37 38 return $name; 39 } 40 41 sub fling_description { 42 my ($self) = @_; 43 44 return 'n/a' if not $self->fling_power; 45 46 my $desc = 'Inflicts regular damage with ' . $self->fling_power . ' power.'; 47 $desc .= ' ' . $self->fling_effect 48 if $self->fling_effect; 49 50 return $desc; 51 } 52 29 53 1; 30 54
