#include <moving.h>#include <properties.h>#include <wizlevels.h>
gehe zum Quellcode dieser Datei
Funktionen | |
| varargs int | remove (int silent) |
| int | start_shadow (object _pl, mapping preset) |
| int | stop_shadow () |
| static nomask mixed | _query_property (string prop) |
| int | _query_article () |
| int | _query_average_size () |
| int | _query_average_weight () |
| int | _query_body () |
| int | _query_gender () |
| mixed | _query_hands () |
| mixed | _query_ids () |
| int | _query_is_morphed () |
| int | _query_max_hands () |
| string | _query_mmsgin () |
| string | _query_mmsgout () |
| string | _query_msgin () |
| string | _query_msgout () |
| string | _query_name () |
| mixed | _query_name_full () |
| string | _query_presay () |
| string | _query_race () |
| string * | _query_racestring () |
| int | _query_size () |
| string | _query_title () |
| int | _query_weight () |
| varargs int | id (string str, int lvl) |
| varargs string | long () |
| string | short () |
Variablen | |
| private mapping | morph_properties |
| private object | pl |
| int _query_article | ( | ) |
Definiert in Zeile 125 der Datei morph_shadow.c.
Benutzt _query_property() und P_ARTICLE.
00126 { 00127 return (int)_query_property( P_ARTICLE ); 00128 }

| int _query_average_size | ( | ) |
Definiert in Zeile 137 der Datei morph_shadow.c.
Benutzt _query_property() und P_AVERAGE_SIZE.
00138 { 00139 return (int)_query_property( P_AVERAGE_SIZE ); 00140 }

| int _query_average_weight | ( | ) |
Definiert in Zeile 149 der Datei morph_shadow.c.
Benutzt _query_property() und P_AVERAGE_WEIGHT.
00150 { 00151 return (int)_query_property( P_AVERAGE_WEIGHT ); 00152 }

| int _query_body | ( | ) |
Definiert in Zeile 161 der Datei morph_shadow.c.
Benutzt _query_property() und P_BODY.
00162 { 00163 return (int)_query_property( P_BODY ); 00164 }

| int _query_gender | ( | ) |
Definiert in Zeile 173 der Datei morph_shadow.c.
Benutzt _query_property() und P_GENDER.
00174 { 00175 return (int)_query_property( P_GENDER ); 00176 }

| mixed _query_hands | ( | ) |
Definiert in Zeile 185 der Datei morph_shadow.c.
Benutzt _query_property() und P_HANDS.
00186 { 00187 return _query_property( P_HANDS ); 00188 }

| mixed _query_ids | ( | ) |
Definiert in Zeile 234 der Datei morph_shadow.c.
Benutzt _query_gender(), gender, ids, IS_LEARNER, morph_properties, P_GENDER, P_IDS, pl und race.
00235 { 00236 string race; 00237 mixed ids; 00238 int gender, sgender; 00239 00240 // Test 1. 00241 ids = pl->Query( P_IDS ); 00242 if ( member( morph_properties, P_IDS ) == 0 ) 00243 return ids; 00244 00245 // Rasse holen. 00246 if ( IS_LEARNER(pl) ) 00247 race = "Magier"; 00248 else // _query_race() ist notwendig, um closures zu umgehen. 00249 race = pl->_query_race(); 00250 00251 // Geschlechter holen 00252 gender = _query_gender(); 00253 sgender = pl->Query( P_GENDER ); 00254 00255 // Test 2. 00256 // string? Dann einfach den normalen ids dazu, genauso mit array 00257 if ( stringp( morph_properties[ P_IDS ] ) ) 00258 return ids + ({ morph_properties[ P_IDS ] }); 00259 if ( pointerp( morph_properties[ P_IDS ] ) ) 00260 return ids + morph_properties[ P_IDS ]; 00261 if ( closurep( morph_properties[ P_IDS ] ) ) 00262 return funcall( morph_properties[ P_IDS ], ids, race, gender, sgender ); 00263 // falls kein mapping, dann raus 00264 if ( !mappingp( morph_properties[ P_IDS ] ) ) 00265 return ids; 00266 00267 // Test 3. 00268 if ( member( morph_properties[ P_IDS ], race ) == 0 ) 00269 return ids; 00270 if ( stringp( morph_properties[ P_IDS ][ race ] ) ) 00271 return ids + ({ morph_properties[ P_IDS ][ race ] }); 00272 if ( pointerp( morph_properties[ P_IDS ][ race ] ) ) 00273 return ids + morph_properties[ P_IDS ][ race ]; 00274 if ( closurep( morph_properties[ P_IDS ][ race ] ) ) 00275 return funcall( morph_properties[ P_IDS ][ race ], ids, race, gender, sgender ); 00276 // falls kein mapping, dann raus 00277 if ( !mappingp( morph_properties[ P_IDS ][ race ] ) ) 00278 return ids; 00279 00280 // Test 4. 00281 if ( member( morph_properties[ P_IDS ][ race ], gender ) == 0 ) 00282 return ids; 00283 if ( stringp( morph_properties[ P_IDS ][ race ][ gender ] ) ) 00284 return ids + ({ morph_properties[ P_IDS ][ race ][ gender ] }); 00285 if ( pointerp( morph_properties[ P_IDS ][ race ][ gender ] ) ) 00286 return ids + morph_properties[ P_IDS ][ race ][ gender ]; 00287 if ( closurep( morph_properties[ P_IDS ][ race ][ gender ] ) ) 00288 return funcall( morph_properties[ P_IDS ][ race ][ gender ], 00289 ids, race, gender, sgender ); 00290 // falls kein mapping, dann raus 00291 if ( !mappingp( morph_properties[ P_IDS ][ race ][ gender ] ) ) 00292 return ids; 00293 00294 // Test 5. 00295 if ( member( morph_properties[ P_IDS ][ race ][ gender ], sgender ) == 0 ) 00296 return ids; 00297 if ( stringp( morph_properties[ P_IDS ][ race ][ gender ][ sgender ] ) ) 00298 return ids + ({ morph_properties[ P_IDS ][ race ][ gender ][ sgender ] }); 00299 if ( pointerp( morph_properties[ P_IDS ][ race ][ gender ][ sgender ] ) ) 00300 return ids + morph_properties[ P_IDS ][ race ][ gender ][ sgender ]; 00301 if ( closurep( morph_properties[ P_IDS ][ race ][ gender ][ sgender ] ) ) 00302 return funcall( morph_properties[ P_IDS ][ race ][ gender ][ sgender ], 00303 ids, race, gender, sgender ); 00304 00305 return ids; 00306 }

| int _query_is_morphed | ( | ) |
Definiert in Zeile 315 der Datei morph_shadow.c.
| int _query_max_hands | ( | ) |
Definiert in Zeile 327 der Datei morph_shadow.c.
Benutzt _query_property() und P_MAX_HANDS.
00328 { 00329 return (int)_query_property( P_MAX_HANDS ); 00330 }

| string _query_mmsgin | ( | ) |
Definiert in Zeile 339 der Datei morph_shadow.c.
Benutzt _query_property() und P_MMSGIN.
00340 { 00341 return (string)(_query_property( P_MMSGIN ) || ""); 00342 }

| string _query_mmsgout | ( | ) |
Definiert in Zeile 351 der Datei morph_shadow.c.
Benutzt _query_property() und P_MMSGOUT.
00352 { 00353 return (string)(_query_property( P_MMSGOUT ) || ""); 00354 }

| string _query_msgin | ( | ) |
Definiert in Zeile 363 der Datei morph_shadow.c.
Benutzt _query_property() und P_MSGIN.
00364 { 00365 return (string)(_query_property( P_MSGIN ) || ""); 00366 }

| string _query_msgout | ( | ) |
Definiert in Zeile 375 der Datei morph_shadow.c.
Benutzt _query_property() und P_MSGOUT.
00376 { 00377 return (string)(_query_property( P_MSGOUT ) || ""); 00378 }

| string _query_name | ( | ) |
Definiert in Zeile 389 der Datei morph_shadow.c.
Benutzt _query_property(), P_NAME, pl und prop.
00390 { 00391 mixed prop; 00392 prop = _query_property( P_NAME ); 00393 if ( stringp( prop ) ) 00394 return sprintf( prop, pl->Query( P_NAME ) ); 00395 if ( pointerp( prop ) ) 00396 return map( prop, 00397 lambda( ({ 'el, 's }), 00398 ({#'sprintf, 'el, 's}) ), 00399 pl->Query( P_NAME ) )[ WER ]; 00400 return pl->Query( P_NAME ); 00401 }

| mixed _query_name_full | ( | ) |
Definiert in Zeile 410 der Datei morph_shadow.c.
Wird benutzt von short().
00411 { 00412 mixed prop; 00413 prop = _query_property( P_NAME ); 00414 if ( stringp( prop ) ) 00415 return sprintf( prop, pl->Query( P_NAME ) ); 00416 if ( pointerp( prop ) ) 00417 return map( prop, 00418 lambda( ({ 'el, 's }), 00419 ({#'sprintf, 'el, 's}) ), 00420 pl->Query( P_NAME ) ); 00421 return pl->Query( P_NAME ); 00422 }

| string _query_presay | ( | ) |
Definiert in Zeile 431 der Datei morph_shadow.c.
Benutzt _query_property() und P_PRESAY.
00432 { 00433 return (string)(_query_property( P_PRESAY ) || ""); 00434 }

| static nomask mixed _query_property | ( | string | prop | ) | [static] |
Definiert in Zeile 92 der Datei morph_shadow.c.
Benutzt IS_LEARNER, morph_properties, pl und race.
Wird benutzt von _query_article(), _query_average_size(), _query_average_weight(), _query_body(), _query_gender(), _query_hands(), _query_max_hands(), _query_mmsgin(), _query_mmsgout(), _query_msgin(), _query_msgout(), _query_name(), _query_presay(), _query_race(), _query_racestring(), _query_size(), _query_title() und _query_weight().
00093 { 00094 string race; 00095 00096 // Rasse holen. 00097 if ( IS_LEARNER(pl) ) 00098 race = "Magier"; 00099 else // _query_race() ist notwendig, um closures zu umgehen. 00100 race = pl->_query_race(); 00101 00102 if ( member( morph_properties, prop ) == 0 ) 00103 return pl->Query( prop ); 00104 if ( closurep( morph_properties[ prop ] ) ) 00105 return funcall( morph_properties[ prop ], race ); 00106 if ( mappingp( morph_properties[ prop ] ) ) 00107 { 00108 if ( member( morph_properties[ prop ], race ) == 0 ) 00109 return pl->Query( prop ); 00110 if ( closurep( morph_properties[ prop ][ race ] ) ) 00111 return funcall( morph_properties[ prop ][ race ] ); 00112 00113 return morph_properties[ prop ][ race ]; 00114 } 00115 return morph_properties[ prop ]; 00116 }

| string _query_race | ( | ) |
Definiert in Zeile 443 der Datei morph_shadow.c.
Benutzt _query_property() und P_RACE.
00444 { 00445 return (string)(_query_property( P_RACE ) || ""); 00446 }

| string* _query_racestring | ( | ) |
Definiert in Zeile 455 der Datei morph_shadow.c.
Benutzt _query_property() und P_RACESTRING.
00456 { 00457 return (string*)_query_property( P_RACESTRING ); 00458 }

| int _query_size | ( | ) |
Definiert in Zeile 467 der Datei morph_shadow.c.
Benutzt _query_property() und P_SIZE.
00468 { 00469 return (int)_query_property( P_SIZE ); 00470 }

| string _query_title | ( | ) |
Definiert in Zeile 479 der Datei morph_shadow.c.
Benutzt _query_property() und P_TITLE.
00480 { 00481 return (string)(_query_property( P_TITLE ) || ""); 00482 }

| int _query_weight | ( | ) |
Definiert in Zeile 491 der Datei morph_shadow.c.
Benutzt _query_property() und P_WEIGHT.
00492 { 00493 return (int)(_query_property( P_WEIGHT ) || ""); 00494 }

| varargs int id | ( | string | str, | |
| int | lvl | |||
| ) |
Definiert in Zeile 503 der Datei morph_shadow.c.
00504 { 00505 string plname; 00506 00507 if ( pl->QueryProp( P_GHOST ) ) 00508 if ( str == "geist" ) 00509 return 1; 00510 else if ( ( sscanf( str, "geist von %s", plname ) == 1 ) && 00511 pl->id( plname ) ) 00512 return 1; 00513 else if ( ( sscanf( str, "geist %s", plname ) == 1 ) && 00514 pl->id( plname ) ) 00515 return 1; 00516 00517 return pl->id( str, lvl ); 00518 }
| varargs string long | ( | ) |
Definiert in Zeile 527 der Datei morph_shadow.c.
Benutzt _query_gender(), i, NEUTER und pl.
00528 { 00529 string slong; 00530 slong = pl->long(); 00531 00532 if ( _query_gender() == NEUTER ) 00533 { 00534 string *along; 00535 int i; 00536 00537 // alle Er-s und er-s suchen... 00538 along = regexplode( slong, "\\<[Ee]r\\>" ); 00539 // ... und das r durch ein s ersetzen. 00540 for ( i = 1 ; i < sizeof( along ) ; i += 2 ) 00541 along[ i ][ 1 ] = 's'; 00542 slong = implode( along, "" ); 00543 } 00544 00545 return slong; 00546 }

| varargs int remove | ( | int | silent | ) |
Definiert in Zeile 591 der Datei morph_shadow.c.
Benutzt destruct().
00592 { 00593 destruct( this_object() ); 00594 return 1; 00595 }

| string short | ( | ) |
Definiert in Zeile 555 der Datei morph_shadow.c.
Benutzt _query_name_full(), IS_LEARNING, P_GHOST, P_NAME, P_TITLE, pl, WER und WESSEN.
00556 { 00557 mixed names; 00558 string answer; 00559 string title; 00560 00561 if ( pl->QueryProp( P_INVIS ) ) 00562 if ( interactive( previous_object() ) && 00563 IS_LEARNING( previous_object() ) ) 00564 return "(" + pl->Query( P_NAME ) + ") \n"; 00565 else 00566 return (string)0; 00567 00568 names = _query_name_full(); 00569 if ( stringp( names ) ) 00570 names = ({ names, names, names, names }); 00571 00572 if ( pl->QueryProp( P_GHOST ) ) 00573 answer = "Der Geist " + pl->QueryArticle( WESSEN, 0 ) + names[ WESSEN ]; 00574 else 00575 answer = pl->QueryArticle( WER, 0 ) + names[ WER ]; 00576 if ( ( title = pl->QueryProp( P_TITLE ) ) && 00577 ( title != "" ) ) 00578 answer += " " + title; 00579 if ( !interactive( pl ) ) 00580 answer += " (netztot)"; 00581 return capitalize( answer ) + ".\n"; 00582 }

| int start_shadow | ( | object | _pl, | |
| mapping | preset | |||
| ) |
Definiert in Zeile 57 der Datei morph_shadow.c.
Benutzt morph_properties, pl und shadow().
00058 { 00059 if ( !clonep( this_object() ) ) 00060 return 1; 00061 if ( !_pl || !query_once_interactive( _pl ) ) 00062 return remove(); 00063 pl = _pl; 00064 morph_properties = deep_copy( preset ); 00065 shadow( pl, 1 ); 00066 return 1; 00067 }

| int stop_shadow | ( | ) |
Definiert in Zeile 76 der Datei morph_shadow.c.
Benutzt unshadow().
00077 { 00078 if ( !clonep( this_object() ) ) 00079 return 0; 00080 unshadow(); 00081 return remove(); 00082 }

| private mapping morph_properties |
Definiert in Zeile 36 der Datei morph_shadow.c.
Wird benutzt von _query_ids(), _query_property() und start_shadow().
| private object pl |
Definiert in Zeile 38 der Datei morph_shadow.c.
1.6.3