• R/O
  • SSH
  • HTTPS

angband65: Commit


Commit MetaInfo

Revision142 (tree)
Zeit2009-05-11 19:04:08
Autorpaulblay

Log Message

IMPORTANT NOTE: The Vanilla Angband 'bugfix' 1379 has been reversed (as it caused the game to crash with Angband/65). This commit should bring 'Tactic' and 'Movement' type into use. From the character screen you can use 't' 'T' 'e' and 'E' to change how your character explores the dungeon.

With this update it has been decided to not support *Identity* in future releases. Use of *Identity* may be revisited after the beta release.

Ändern Zusammenfassung

Diff

--- trunk/Angband65/src/birth.c (revision 141)
+++ trunk/Angband65/src/birth.c (revision 142)
@@ -1001,7 +1001,7 @@
10011001 generate_player();
10021002
10031003 /* Update stats with bonuses, etc. */
1004- get_bonuses();
1004+/* get_bonuses(); */ /* TODO This change (Changeset 140) caused game crash */
10051005 }
10061006
10071007 /*
@@ -1040,8 +1040,9 @@
10401040 if (quickstart_allowed)
10411041 save_roller_data(&quickstart_prev);
10421042
1043+ do_birth_reset(quickstart_allowed, &quickstart_prev);
10431044 reset_stats(stats, points_spent, &points_left);
1044- do_birth_reset(quickstart_allowed, &quickstart_prev);
1045+/* do_birth_reset(quickstart_allowed, &quickstart_prev); */ /* TODO This change (Changeset 140) caused gamecrash */
10451046
10461047 /* We're ready to start the interactive birth process. */
10471048 event_signal(EVENT_ENTER_BIRTH);
@@ -1058,8 +1059,10 @@
10581059
10591060 if (cmd.command == CMD_BIRTH_RESET)
10601061 {
1062+ do_birth_reset(quickstart_allowed, &quickstart_prev);
1063+ generate_player();
10611064 reset_stats(stats, points_spent, &points_left);
1062- do_birth_reset(quickstart_allowed, &quickstart_prev);
1065+/* do_birth_reset(quickstart_allowed, &quickstart_prev); */ /* Changeset 140 */
10631066 rolled_stats = FALSE;
10641067 }
10651068 else if (cmd.command == CMD_CHOOSE_SEX)
--- trunk/Angband65/src/cmd-obj.c (revision 141)
+++ trunk/Angband65/src/cmd-obj.c (revision 142)
@@ -826,3 +826,55 @@
826826 void do_cmd_quaff_potion(void) { do_item(ACTION_QUAFF_POTION); }
827827 void do_cmd_read_scroll(void) { do_item(ACTION_READ_SCROLL); }
828828 void do_cmd_refill(void) { do_item(ACTION_REFILL); }
829+
830+
831+/*
832+ * Place an item description on the screen.
833+ * TODO REMOVE THIS if *identify* not to be used.
834+ */
835+void object_info_screen(const object_type *o_ptr)
836+{
837+ UNREFERENCED_PARAMETER(o_ptr);
838+#if 0
839+ bool has_description, has_info;
840+
841+ /* Redirect output to the screen */
842+ text_out_hook = text_out_to_screen;
843+
844+ /* Save the screen */
845+ screen_save();
846+
847+ text_out("\n");
848+ has_description = screen_out_head(o_ptr);
849+ object_info_out_flags = object_flags_known;
850+
851+ /* Dump the info */
852+ has_info = object_info_out(o_ptr);
853+
854+ /* Dump origin info */
855+ text_out("\n");
856+ describe_origin(o_ptr);
857+
858+ text_out("\n");
859+ if (!object_known_p(o_ptr))
860+ p_text_out("You do not know the full extent of this item's powers.");
861+ else if (!has_description && !has_info)
862+ p_text_out("This item does not seem to possess any special abilities.");
863+
864+ text_out("\n");
865+ text_out_c(TERM_L_BLUE, "\n\n[Press any key to continue]\n");
866+
867+ /* Wait for input */
868+ (void)anykey();
869+
870+ /* Load the screen */
871+ screen_load();
872+
873+ /* Hack -- Browse book, then prompt for a command */
874+ if (o_ptr->tval == cp_ptr->spell_book)
875+ {
876+ /* Call the aux function */
877+ do_cmd_browse_aux(o_ptr);
878+ }
879+#endif
880+}
--- trunk/Angband65/src/object/randart.c (revision 141)
+++ trunk/Angband65/src/object/randart.c (revision 142)
@@ -799,11 +799,9 @@
799799 a_ptr->pval++;
800800 LOG_PRINT1("Increasing pval by 1, new value is: %d\n", a_ptr->pval);
801801 }
802+
802803 }
803804
804-
805-#if 0
806-// not used
807805 /*
808806 * We've just added an ability which uses the p2val bonus. Make sure it's
809807 * not zero. If it's currently negative, leave it negative (heh heh).
@@ -811,10 +809,11 @@
811809 * There should be a better way of handling pval vs p2val than doing two
812810 * functions but that can wait for later.
813811 */
812+#if 0
814813 static void do_p2val(artifact_type *a_ptr)
815814 {
816815 int factor= 1;
817-
816+
818817 /* Track whether we have blows, might or shots on this item */
819818 if (a_ptr->flags[0] & TR0_BLOWS2) factor++;
820819 /* HACK There is no MIGHT2 */
--- trunk/Angband65/src/defines.h (revision 141)
+++ trunk/Angband65/src/defines.h (revision 142)
@@ -677,7 +677,7 @@
677677 TMD_COLD, TMD_ACID, TMD_ELEC, TMD_BLESSED, TMD_SINVIS, TMD_SINFRA,
678678 TMD_OPP_ACID, TMD_OPP_ELEC, TMD_OPP_FIRE, TMD_OPP_COLD, TMD_OPP_POIS,
679679 TMD_OPP_CONF, TMD_AMNESIA, TMD_TELEPATHY, TMD_STONESKIN, TMD_TERROR,
680- TMD_SPRINT, TMD_LIFT,
680+ TMD_SPRINT, TMD_LIFT, TMD_READING,
681681
682682 TMD_MAX
683683 };
@@ -1293,6 +1293,7 @@
12931293 #define PR_MONLIST 0x01000000L /* Display monster list */
12941294 #define PR_BUTTONS 0x02000000L /* Display mouse buttons */
12951295 #define PR_ITEMLIST 0x04000000L /* Display item list */
1296+#define PR_READ 0x08000000L /* TODO Make this work */
12961297
12971298 /* Display Basic Info */
12981299 #define PR_BASIC \
@@ -1375,7 +1376,6 @@
13751376 #define IDENT_WORN 0x0100 /* Has been worn */
13761377 #define IDENT_INDESTRUCT 0x0200 /* Tried to destroy it and failed */
13771378
1378-
13791379 /*
13801380 * Some bit-flags for the "smart" field of "monster_type".
13811381 *
--- trunk/Angband65/src/list-effects.h (revision 141)
+++ trunk/Angband65/src/list-effects.h (revision 142)
@@ -104,7 +104,7 @@
104104 EFFECT(ENCHANT_WEAPON, FALSE,12, "attempts to magically enhance a weapon both to-hit and to-dam")
105105 EFFECT(ENCHANT_ARMOR, FALSE, 5, "attempts to magically enhance a piece of armor")
106106 EFFECT(ENCHANT_ARMOR2, FALSE, 8, "attempts to magically enhance a piece of armor with high chance of success")
107-EFFECT(IDENTIFY, FALSE, 9, "reveals to you the extent of an item's magical powers")
107+EFFECT(IDENTIFY, FALSE, 9, "reveals all unhidden powers of an object")
108108 EFFECT(REMOVE_CURSE, FALSE, 3, "removes all ordinary curses from all equipped items")
109109 EFFECT(REMOVE_CURSE2, FALSE, 6, "removes all curses from all equipped items")
110110 EFFECT(LIGHT, FALSE, 2, "lights up an area and inflicts 2d8 damage on light-sensitive creatures")
@@ -277,8 +277,6 @@
277277 EFFECT(MULE_LEGS, FALSE, 0, "makes you able to carry heavy loads for a while.")
278278 EFFECT(CREATE_TREASURE, FALSE, 0, "creates treasure right in front of you.")
279279 /* See also Vanilla Angband History */
280-EFFECT(IDENTIFY2, FALSE, 0, "informs you of all hidden qualities and subtle aspects of one item.")
281-/* See also Vanilla Angband History */
282280 EFFECT(DETECT_OBJECT, FALSE, 0, "lets you know if there are any objects in the dungeon around you.")
283281 /* See also Vanilla Angband History */
284282 EFFECT(GENOCIDE, FALSE, 0, "lets you wipe one race in this dungeon level, at a cost of up to 10% of monster level in hitpoints per monster.")
--- trunk/Angband65/src/player/calcs.c (revision 141)
+++ trunk/Angband65/src/player/calcs.c (revision 142)
@@ -748,7 +748,6 @@
748748 }
749749 }
750750
751-
752751 /*** Update all flags ***/
753752
754753 /* Good flags */
@@ -811,7 +810,6 @@
811810 if (collect_f[2] & TR2_HOLD_LIFE) state->hold_life = TRUE;
812811
813812
814-
815813 /*** Handle stats ***/
816814
817815 /* Calculate stats */
@@ -860,7 +858,6 @@
860858 state->stat_ind[i] = INT2S16B(ind);
861859 }
862860
863-
864861 /*** Temporary flags ***/
865862
866863 /* Apply temporary "stun" */
@@ -898,7 +895,6 @@
898895 p_ptr->state.skills[SKILL_SEARCH_FREQUENCY] += move_info[p_ptr->movement].to_percep;
899896 p_ptr->state.skills[SKILL_STEALTH] += move_info[p_ptr->movement].to_stealth;
900897
901-
902898 /* Invulnerability */
903899 if (p_ptr->timed[TMD_INVULN])
904900 {
@@ -997,7 +993,6 @@
997993 state->dis_to_a += 8;
998994 }
999995
1000-
1001996 /*** Analyze weight ***/
1002997
1003998 /* Extract the current weight (in tenth pounds) */
@@ -1014,7 +1009,6 @@
10141009 state->skills[SKILL_STEALTH] -= 5;
10151010 }
10161011
1017-
10181012 /* Apply "encumbrance" from weight */
10191013 if (j > i / 2) state->speed -= INT2S16B((j - (i / 2)) / (i / 10));
10201014
@@ -1046,7 +1040,6 @@
10461040 state->dis_to_h += ((int)(adj_dex_th[state->stat_ind[A_DEX]]) - 128);
10471041 state->dis_to_h += ((int)(adj_str_th[state->stat_ind[A_STR]]) - 128);
10481042
1049-
10501043 /*** Modify skills ***/
10511044
10521045 /* Affect Skill -- stealth (bonus one) */
@@ -1086,7 +1079,6 @@
10861079 /* Obtain the "hold" value */
10871080 hold = adj_str_hold[state->stat_ind[A_STR]];
10881081
1089-
10901082 /*** Analyze current bow ***/
10911083
10921084 /* Examine the "current bow" */
@@ -1181,7 +1173,6 @@
11811173 if (state->num_fire < 1) state->num_fire = 1;
11821174 }
11831175
1184-
11851176 /*** Analyze weapon ***/
11861177
11871178 /* Examine the "current weapon" */
@@ -1298,7 +1289,6 @@
12981289 }
12991290 }
13001291
1301-
13021292 /* Hack -- Telepathy Change */
13031293 if (state->telepathy != old.telepathy)
13041294 {
@@ -1386,9 +1376,6 @@
13861376 /* TODO Is this the point to handle COULD2H and MUST2H ? */
13871377 }
13881378
1389-
1390-
1391-
13921379 /*** Generic "deal with" functions ***/
13931380
13941381 /*
@@ -1503,7 +1490,6 @@
15031490 update_flow();
15041491 }
15051492
1506-
15071493 if (p_ptr->update & (PU_DISTANCE))
15081494 {
15091495 p_ptr->update &= ~(PU_DISTANCE);
@@ -1517,7 +1503,6 @@
15171503 update_monsters(FALSE);
15181504 }
15191505
1520-
15211506 if (p_ptr->update & (PU_PANEL))
15221507 {
15231508 p_ptr->update &= ~(PU_PANEL);
@@ -1525,8 +1510,6 @@
15251510 }
15261511 }
15271512
1528-
1529-
15301513 struct flag_event_trigger
15311514 {
15321515 u32b flag;
@@ -1533,8 +1516,6 @@
15331516 game_event_type event;
15341517 };
15351518
1536-
1537-
15381519 /*
15391520 * Events triggered by the various flags.
15401521 */
@@ -1607,7 +1588,6 @@
16071588 event_signal(EVENT_END);
16081589 }
16091590
1610-
16111591 /*
16121592 * Handle "p_ptr->update" and "p_ptr->redraw"
16131593 */
@@ -1619,4 +1599,3 @@
16191599 /* Redraw stuff */
16201600 if (p_ptr->redraw) redraw_stuff();
16211601 }
1622-
--- trunk/Angband65/src/player/p-types.h (revision 141)
+++ trunk/Angband65/src/player/p-types.h (revision 142)
@@ -109,13 +109,10 @@
109109 byte py; /* Player location */
110110 byte px; /* Player location */
111111
112- s16b movement; /* Current movement type */ /* TODO Check this works! */
113- s16b tactic; /* Current tactic type */ /* TODO Check this works! */
114-
115112 byte psex; /* Sex index */
116113 byte prace; /* Race index */
117114 byte pclass; /* Class index */
118- byte oops; /* Unused */ /* TODO Get rid of this */
115+ byte oops;
119116
120117 byte hitdie; /* Hit dice (sides) */
121118 s16b expfact; /* Experience factor */
@@ -242,10 +239,8 @@
242239 s16b wt_birth; /* Birth Weight */
243240 s16b sc_birth; /* Birth social class */
244241
245-/* TODO These new parameters should possibly be better handled in different ways */
246- s16b reading; /* Timed -- reading page/prayer */
247- u32b redraw1; /* Desired Redraws (bit flags) */
248- u32b redraw2; /* Desired Redraws (bit flags) */
242+ byte movement; /* Current movement type */ /* TODO Check this works! */
243+ byte tactic; /* Current tactic type */ /* TODO Check this works! */
249244
250245 /* Variable and calculatable player state */
251246 player_state state;
--- trunk/Angband65/src/cave.c (revision 141)
+++ trunk/Angband65/src/cave.c (revision 142)
@@ -3882,9 +3882,9 @@
38823882
38833883 /* jk */
38843884 /* don't disturb on the first turn */
3885- if ((p_ptr->reading) && (p_ptr->reading < max_reading)) /* TODO reading should be TMD effect ? */
3885+ if ((p_ptr->timed[TMD_READING]) && (p_ptr->timed[TMD_READING] < max_reading)) /* TODO reading should be TMD effect ? */
38863886 {
3887- p_ptr->reading=0;
3887+ p_ptr->timed[TMD_READING] = 0;
38883888 read_spell(NULL, 0);
38893889 }
38903890
--- trunk/Angband65/src/effects.c (revision 141)
+++ trunk/Angband65/src/effects.c (revision 142)
@@ -167,7 +167,26 @@
167167 {
168168 /* Added for Angband/65 0.0.0 */
169169 case EF_CREATE_TREASURE:
170- case EF_IDENTIFY2:
170+ {
171+ int x = px, y = py;
172+ place_gold(y, x, p_ptr->depth);
173+ note_spot(x, y);
174+ lite_spot(x, y);
175+ if ((x==px) && (y==py))
176+ {
177+ msg_print("You feel some treasure appear between your feet.");
178+ }
179+ else
180+ {
181+ if (p_ptr->timed[TMD_BLIND])
182+ msg_print("You hear something trinkle on the floor.");
183+ else
184+ msg_print("You see some treasure appear.");
185+ }
186+
187+ *ident = TRUE;
188+ return TRUE;
189+ }
171190 case EF_DETECT_OBJECT:
172191 case EF_GENOCIDE:
173192 case EF_GENOCIDE2:
--- trunk/Angband65/src/cmd5.c (revision 141)
+++ trunk/Angband65/src/cmd5.c (revision 142)
@@ -455,7 +455,7 @@
455455 {
456456 penalize_spell();
457457 }
458- p_ptr->redraw1 |= (PR1_MANA); /* TODO Should probably be done a different way */
458+ p_ptr->redraw |= PR_MANA;
459459
460460 return (TRUE);
461461 }
@@ -730,12 +730,12 @@
730730 return;
731731 }
732732
733- if (p_ptr->reading == 0)
733+ if (p_ptr->timed[TMD_READING] == 0)
734734 {
735735 if (was_reading)
736736 {
737737 msg_print("You know nothing more than before about this spell.");
738- p_ptr->redraw2 |= (PR2_READ);
738+ p_ptr->redraw |= PR_READ;
739739 redraw_stuff();
740740 was_reading = FALSE;
741741
@@ -861,7 +861,7 @@
861861 msg_format("You start to meditate on this spell.", chance);
862862 was_reading = TRUE;
863863 max_reading = chance;
864- p_ptr->reading = chance;
864+ p_ptr->timed[TMD_READING] = chance;
865865 k_ptr = o_ptr;
866866 itemr = item;
867867 return;
@@ -875,7 +875,7 @@
875875 o_ptr = k_ptr;
876876 item = itemr;
877877
878- p_ptr->redraw2 |= (PR2_READ);
878+ p_ptr->redraw |= PR_READ;
879879 redraw_stuff();
880880
881881 /* we can't read it if it's for the wrong class */
--- trunk/Angband65/src/tables.c (revision 141)
+++ trunk/Angband65/src/tables.c (revision 142)
@@ -1471,6 +1471,6 @@
14711471 { 0, 0, 0, 0, "normal"}, /* 4+0 */
14721472 { 1, -4, -1, -4, "brisk"}, /* 4+1 */
14731473 { 2, -6, -2, -8, "fast"}, /* 4+2 */
1474- { 3, -10, -3, -14, "very fast"}, /* 4+3 */
1474+ { 3, -10, -3, -14, "very fast"}, /* 4+3 */
14751475 { 4, -16, -5, -20, "running"} /* 4+4 */
14761476 };
--- trunk/Angband65/lib/edit/object.txt (revision 141)
+++ trunk/Angband65/lib/edit/object.txt (revision 142)
@@ -1347,7 +1347,7 @@
13471347 # F:DETECT_DOORS_STAIRS
13481348 G:?:b
13491349 I:71:26:0:0
1350-W:40:0:5:0
1350+W:40:0:5:100
13511351 # A:<locale>5/<chance>1
13521352 D:This spell will let your God reveal doors and stairs to you.
13531353
@@ -1495,7 +1495,7 @@
14951495 # F:FIND_TRAPS
14961496 G:?:b
14971497 I:71:44:0:0
1498-W:40:0:5:0
1498+W:40:0:5:70
14991499 # A:<locale>5/<chance>2
15001500 D:This spell will let your God reveal hidden traps to you.
15011501
@@ -1749,7 +1749,7 @@
17491749 # F:PHASE_DOOR
17501750 G:?:b
17511751 I:71:72:0:0
1752-W:40:0:5:0
1752+W:40:0:5:30
17531753 # A:<locale>5/<chance>1
17541754 D:The spell will let you teleport some short distance away.
17551755
@@ -1945,7 +1945,7 @@
19451945 # F:SENSE_INVISIBLE
19461946 G:?:b
19471947 I:71:95:0:0
1948-W:40:0:5:0
1948+W:40:0:5:30
19491949 # A:<locale>20/<chance>1
19501950 D:This spell will reveal all invisible monsters to your blessed eyes for a time.
19511951
@@ -2052,7 +2052,7 @@
20522052 # F:TELEPORT
20532053 G:?:b
20542054 I:71:108:0:0
2055-W:40:0:5:0
2055+W:40:0:5:80
20562056 # A:<locale>40/<chance>1
20572057 D:This spell will teleport you across the dungeon in an instant.
20582058
@@ -2068,7 +2068,7 @@
20682068 # F:TELEPORT_LEVEL
20692069 G:?:b
20702070 I:71:110:0:0
2071-W:40:0:5:0
2071+W:40:0:5:100
20722072 # A:<locale>50/<chance>1
20732073 D:This spell will transport you to another level in the dungeon.
20742074
@@ -2109,7 +2109,7 @@
21092109 # F:TREASURE_DETECTION
21102110 G:?:b
21112111 I:71:115:0:0
2112-W:40:0:5:0
2112+W:40:0:5:60
21132113 # A:<locale>5/<chance>1
21142114 D:The spell will let you detect nearby treasure.
21152115
@@ -2290,15 +2290,6 @@
22902290 A:100:5 to 100
22912291 F:EASY_KNOW
22922292
2293-N:238:*Identify*
2294-G:?:w
2295-I:70:13:0:0
2296-W:30:0:5:1000
2297-# A:<locale>30/<chance>1
2298-D:It will learn you all hidden qualities and subtle aspects of one item.
2299-E:IDENTIFY2
2300-F:EASY_KNOW
2301-
23022293 N:239:Remove Curse
23032294 G:?:w
23042295 I:70:14:0:0
Show on old repository browser