001 package com.croftsoft.apps.dice; 002 003 /********************************************************************* 004 * Non-Player Character (NPC) data. 005 * 006 * @version 007 * 2002-02-27 008 * @since 009 * 1996-08-23 010 * @author 011 * <a href="https://www.croftsoft.com/">David Wallace Croft</a> 012 *********************************************************************/ 013 014 public class NPC { 015 ////////////////////////////////////////////////////////////////////// 016 ////////////////////////////////////////////////////////////////////// 017 018 String name; 019 long xp; 020 Combat_Stats combat_stats; 021 022 ////////////////////////////////////////////////////////////////////// 023 ////////////////////////////////////////////////////////////////////// 024 025 public NPC ( String npc_name, long npc_xp ) { 026 this.name = npc_name; 027 this.xp = npc_xp; 028 this.combat_stats = new Combat_Stats ( ); 029 } 030 031 public NPC ( String npc_name ) { 032 this ( npc_name, 0L ); 033 } 034 035 public NPC ( ) { 036 this ( "Un-named NPC" ); 037 } 038 039 public String toString ( ) { 040 ////////////////////////////////////////////////////////////////////// 041 return "Name = " + this.name + " " 042 + " XP = " + this.xp 043 + " " + this.combat_stats.toString ( ); 044 } 045 046 ////////////////////////////////////////////////////////////////////// 047 ////////////////////////////////////////////////////////////////////// 048 } 049