aher

Simplified OD&D alternative combat simulator in NetLogo

Apr 13th, 2013
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.74 KB | None | 0 0
  1. ;;; odd-combat.nlogo
  2. ;;; Simplified original (1974) dungeons & dragons alternative combat system simulator in NetLogo
  3. ;;; More info at bottom of listing.
  4.  
  5.  
  6. extensions [matrix]
  7.  
  8. globals [men-attacking monsters-attacking fighting-men-hd]
  9.  
  10. ;; Routines for creating men and monsters
  11.  
  12. breed [men man]
  13. breed [monsters monster]
  14.  
  15. turtles-own [class race level name ac mv hd plusses max-hp cur-hp to-hit dmg immobile-til]
  16.  
  17. ;; to-hit : function takes target's ac and returns "to hit" number to beat on d20
  18. ;; dmg : function takes target and dishes out damage to it; called after successful "to hit" roll
  19. ;; immobile-til: if agent becomes surprised/paralyzed/etc, set this to clock tick he's once again active
  20. ;; N.B. ghouls paralyze (non-elf) victims who miss save vs paralysis for 2d4 ticks
  21.  
  22. ;; Men
  23. to set-man
  24. set class "Fighting Man"
  25. set race "Human"
  26. set level level-men ; we set this on the UI
  27. set ac ac-men ; ditto
  28. set mv mv-men ; ditto
  29. set name (matrix:get fighting-men-hd (level - 1) 2)
  30. set hd (matrix:get fighting-men-hd (level - 1) 0)
  31. set plusses (matrix:get fighting-men-hd (level - 1) 1)
  32. set max-hp set-hp hd plusses
  33. set cur-hp max-hp
  34. set to-hit task [men-to-hit ? level] ; function takes target's ac and returns to-hit number to beat on d20
  35. set dmg task [std-dmg ?] ; function takes target and damages it
  36. set immobile-til 0
  37. set shape "person"
  38. set color blue
  39. set xcor -20
  40. set ycor ((random 50) - 25)
  41. set heading 90
  42. end
  43.  
  44. ;; Monsters
  45. to set-orc [x]
  46. set race "Orc"
  47. set ac 6
  48. set mv 9
  49. set hd 1
  50. set plusses 0
  51. set max-hp set-hp hd plusses
  52. set cur-hp max-hp
  53. set to-hit task [monsters-to-hit ? hd plusses]
  54. set dmg task [std-dmg ?]
  55. set immobile-til 0
  56. set shape "person"
  57. set color red
  58. set size 1
  59. set xcor x
  60. set ycor ((random 50) - 25)
  61. set heading -90
  62. end
  63.  
  64. to set-hobgoblin [x]
  65. set race "Hobgoblin"
  66. set ac 5
  67. set mv 9
  68. set hd 1
  69. set plusses 1
  70. set max-hp set-hp hd plusses
  71. set cur-hp max-hp
  72. set to-hit task [monsters-to-hit ? hd plusses]
  73. set dmg task [std-dmg ?]
  74. set immobile-til 0
  75. set shape "person"
  76. set color red
  77. set size 1.5
  78. set xcor x
  79. set ycor ((random 50) - 25)
  80. set heading -90
  81. end
  82.  
  83. to set-ogre [x]
  84. set race "Ogre"
  85. set ac 5
  86. set mv 9
  87. set hd 4
  88. set plusses 1
  89. set max-hp set-hp hd plusses
  90. set cur-hp max-hp
  91. set to-hit task [monsters-to-hit ? hd plusses]
  92. set dmg task [ogre-dmg ?]
  93. set immobile-til 0
  94. set shape "person"
  95. set color red
  96. set size 2
  97. set xcor x
  98. set ycor ((random 50) - 25)
  99. set heading -90
  100. end
  101.  
  102. to set-ghoul [x]
  103. set race "Ghoul"
  104. set ac 6
  105. set mv 9
  106. set hd 2
  107. set plusses 0
  108. set max-hp set-hp hd plusses
  109. set cur-hp max-hp
  110. set to-hit task [monsters-to-hit ? hd plusses]
  111. set dmg task [ghoul-dmg ?]
  112. set immobile-til 0
  113. set shape "person"
  114. set color yellow
  115. set size 1
  116. set xcor x
  117. set ycor ((random 50) - 25)
  118. set heading -90
  119. end
  120.  
  121. ;; Calculate hit points from hit dice and plusses
  122. to-report set-hp [h p]
  123. if h = 0.5 [report (d 3) + p]
  124. report (roll h 6) + p
  125. end
  126.  
  127. ;; Routines to apply damage to a target t
  128. to std-dmg [t]
  129. ask t [
  130. set cur-hp max (list 0 (cur-hp - d6))
  131. if cur-hp <= 0 [die]
  132. ]
  133. end
  134.  
  135. to ghoul-dmg [t]
  136. ask t [
  137. set cur-hp max (list 0 (cur-hp - d6))
  138. if not save-versus-paralysis [set immobile-til (ticks + roll 2 4)]
  139. if cur-hp <= 0 [die]
  140. ]
  141. end
  142.  
  143. to ogre-dmg [t]
  144. ask t [
  145. set cur-hp max (list 0 (cur-hp - d6 - 2)) ; ogres do an extra 2 pts dmg
  146. if cur-hp <= 0 [die]
  147. ]
  148. end
  149.  
  150. ;; Saving throws
  151. to-report save-versus-paralysis
  152. ifelse race = "Elf"
  153. [report true]
  154. ;else
  155. [
  156. ifelse class = "Fighting Man"
  157. [
  158. let saves [13 11 9 7 5 5]
  159. let i (int ((level - 1) / 3))
  160. let tn item i saves
  161. report d20 >= tn
  162. ]
  163. ; else
  164. [
  165. ; TODO
  166. report true
  167. ]
  168. ]
  169. end
  170.  
  171. ;; Routines for initializing "To Hit" Tables
  172. to set-to-hit
  173. ; Men Attacking Table
  174. ; row = AC - 2, col = floor ((Level - 1) / 3)
  175. set men-attacking matrix:from-row-list [
  176. ; 1-3 4-6 7-9 10-12 13-15 16&+
  177. [17 15 12 10 8 5] ; AC 2
  178. [16 14 11 9 7 4] ; AC 3
  179. [15 13 10 8 6 3] ; AC 4
  180. [14 12 9 7 5 2] ; AC 5
  181. [13 11 8 6 4 1] ; AC 6
  182. [12 10 7 5 3 1] ; AC 7
  183. [11 9 6 4 2 1] ; AC 8
  184. [10 8 5 3 1 1] ; AC 9
  185. ]
  186.  
  187. ; Monsters Attacking Table
  188. ; row = AC - 2, col ~ HD
  189. set monsters-attacking matrix:from-row-list [
  190. ; 1 1+1 2-3 3-4 4-6 6-8 9-10 11&+
  191. [17 16 15 13 12 11 9 7] ; AC 2
  192. [16 15 14 12 11 10 8 6] ; AC 3
  193. [15 14 13 11 10 9 7 5] ; AC 4
  194. [14 13 12 10 9 8 6 4] ; AC 5
  195. [13 12 11 9 8 7 5 3] ; AC 6
  196. [12 11 10 8 7 6 4 2] ; AC 7
  197. [11 10 9 7 6 5 3 1] ; AC 8
  198. [10 9 8 6 5 4 2 0] ; AC 9
  199. ]
  200.  
  201. ; Fighting Men HD
  202. ; starts at level 1, so row = (level - 1)
  203. ; each row represents HD, Plusses, name
  204. set fighting-men-hd matrix:from-row-list
  205. [ [1 1 "Veteran"] [2 0 "Warrior"] [3 0 "Swordsman"] [4 0 "Hero"] [5 1 "Swashbuckler"]
  206. [6 0 "Myrmidon"] [7 1 "Champion"] [8 2 "Superhero"] [9 3 "Lord"] [10 1 "Lord, 10th Level"] ]
  207. end
  208.  
  209. to-report ac-to-row [a]
  210. report (a - 2)
  211. end
  212.  
  213. to-report level-to-col [l]
  214. report floor ((l - 1) / 3)
  215. end
  216.  
  217. to-report hd-to-col [h p]
  218. if h <= 1 and p <= 0 [report 0]
  219. if h < 1 and p > 0 [report 0]
  220. if h = 1 and p > 0 [report 1]
  221. if h = 2 [report 2]
  222. if h = 3 and p <= 0 [report 2]
  223. if h = 3 and p > 0 [report 3]
  224. if h = 4 and p <= 0 [report 3]
  225. if h = 4 and p > 0 [report 4]
  226. if h = 5 [report 4]
  227. if h = 6 and p <= 0 [report 4]
  228. if h = 6 and p > 0 [report 5]
  229. if h = 7 or h = 8 [report 5]
  230. if h = 9 or h = 10 [report 6]
  231. if h >= 11 [report 7]
  232. end
  233.  
  234. to-report men-to-hit [a l]
  235. report matrix:get men-attacking (ac-to-row a) (level-to-col l)
  236. end
  237.  
  238. to-report monsters-to-hit [a h p]
  239. report matrix:get men-attacking (ac-to-row a) (hd-to-col h p)
  240. end
  241.  
  242. ;; Routines for dice
  243.  
  244. ; roll a 20-sided die (d20)
  245. to-report d20
  246. report (1 + (random 20))
  247. end
  248.  
  249. to-report d6
  250. report (1 + (random 6))
  251. end
  252.  
  253. to-report d [n]
  254. report (1 + (random n))
  255. end
  256.  
  257. ; roll m n-sided dice and sum the result
  258. to-report roll [m n]
  259. if m < 1 [report 0]
  260. report (d n) + roll (m - 1) n
  261. end
  262.  
  263. ; Test dice roll functions
  264. ; Expects the number of samples n and sampling task t then reports statistics
  265. ; E.g., roll a d20 100 times and summarize the results--
  266. ; test-dice 100 task [d20]
  267. ; E.g., roll a 3d6 100 times and summarize the results--
  268. ; test-dice 100 task [roll 3 6]
  269. to test-dice [n t]
  270. let rolls n-values n [runresult t]
  271. print word "num rolls: " n
  272. print word "rolls: " rolls
  273. print word "min: " min rolls
  274. print word "max: " max rolls
  275. print word "mean: " mean rolls
  276. print word "median: " median rolls
  277. print word "modes: " modes rolls
  278. print word "stdev: " standard-deviation rolls
  279. print word "variance: " variance rolls
  280. print word "sum: " sum rolls
  281. end
  282.  
  283. ;;;;; Main routines ;;;;;
  284.  
  285. ;; Setup the battlefield
  286.  
  287. to setup
  288. ca
  289. set-to-hit
  290. ; Men
  291. create-men num-men [set-man]
  292. ; Monsters
  293. if num-monsters-1 > 0 [create-monsters num-monsters-1 [monster-setter monsters-1 10]]
  294. if num-monsters-2 > 0 [create-monsters num-monsters-2 [monster-setter monsters-2 20]]
  295. reset-ticks
  296. end
  297.  
  298. ;; monster-setter: t = type of monster, x = x-coordinate
  299. to monster-setter [t x]
  300. if t = "Ghoul" [set-ghoul x]
  301. if t = "Hobgoblin" [set-hobgoblin x]
  302. if t = "Ogre" [set-ogre x]
  303. if t = "Orc" [set-orc x]
  304. end
  305.  
  306. ;; Run the simulation
  307.  
  308. to go
  309. ; foreach attacker...in randomized order
  310. ask turtles [ ; N.B. Both "men" and "monsters" are just turtles
  311.  
  312. ; Target acquisition
  313. ; if attacker has no target, choose the closest one (if any)
  314. if not any? out-link-neighbors
  315. [
  316. if breed = men and any? monsters [
  317. create-link-to min-one-of monsters [distance myself] [
  318. set color blue
  319. set hidden? true
  320. ]
  321. ]
  322. if breed = monsters and any? men [
  323. create-link-to min-one-of men [distance myself] [
  324. set color green
  325. set hidden? true
  326. ]
  327. ]
  328. ]
  329.  
  330. ; check if we're surprised or paralyzed or otherwise can't take actions
  331. if ticks >= immobile-til [
  332. ; if attacker has a target, move towards it if not already in melee contact, otherwise melee
  333. if any? out-link-neighbors
  334. [
  335. let target one-of out-link-neighbors
  336. let dist distance target
  337. ifelse dist > 1
  338. [
  339. face target
  340. fd min (list dist mv)
  341. ]
  342. ; else attacker and target already in melee contact
  343. [
  344. ; roll d20 "to hit" versus target's ac
  345. if d20 >= (runresult to-hit ([ac] of target)) [
  346. ; success! attacker hits target
  347. ; now apply damage
  348. (run dmg target)
  349. ]
  350. ]
  351. ]
  352. ]
  353. ]
  354.  
  355. ; stop if one side obliterated
  356. if not any? men or not any? monsters [stop]
  357.  
  358. tick
  359. end
  360.  
  361. to status
  362. print "STATUS"
  363. if count monsters = 0 [print "men won!"]
  364. if count men = 0 [print "monsters won!"]
  365. print word "ticks: " ticks
  366. print word "men: " count men
  367. print word "monsters: " count monsters
  368. print (word "hp of men: " sort ([cur-hp] of men)
  369. " total: " (sum ([cur-hp] of men)))
  370. print (word "hp of monsters: " sort ([cur-hp] of monsters)
  371. " total: " (sum ([cur-hp] of monsters)))
  372. end
  373. @#$#@#$#@
  374. GRAPHICS-WINDOW
  375. 210
  376. 10
  377. 883
  378. 704
  379. 25
  380. 25
  381. 13.0
  382. 1
  383. 10
  384. 1
  385. 1
  386. 1
  387. 0
  388. 0
  389. 0
  390. 1
  391. -25
  392. 25
  393. -25
  394. 25
  395. 0
  396. 0
  397. 1
  398. ticks
  399. 30.0
  400.  
  401. SLIDER
  402. 16
  403. 270
  404. 188
  405. 303
  406. num-monsters-1
  407. num-monsters-1
  408. 0
  409. 20
  410. 10
  411. 1
  412. 1
  413. NIL
  414. HORIZONTAL
  415.  
  416. SLIDER
  417. 17
  418. 47
  419. 189
  420. 80
  421. num-men
  422. num-men
  423. 1
  424. 20
  425. 10
  426. 1
  427. 1
  428. NIL
  429. HORIZONTAL
  430.  
  431. SLIDER
  432. 17
  433. 83
  434. 189
  435. 116
  436. level-men
  437. level-men
  438. 1
  439. 10
  440. 4
  441. 1
  442. 1
  443. NIL
  444. HORIZONTAL
  445.  
  446. SLIDER
  447. 16
  448. 119
  449. 188
  450. 152
  451. ac-men
  452. ac-men
  453. 2
  454. 9
  455. 6
  456. 1
  457. 1
  458. NIL
  459. HORIZONTAL
  460.  
  461. SLIDER
  462. 16
  463. 156
  464. 188
  465. 189
  466. mv-men
  467. mv-men
  468. 6
  469. 12
  470. 9
  471. 3
  472. 1
  473. NIL
  474. HORIZONTAL
  475.  
  476. TEXTBOX
  477. 22
  478. 25
  479. 172
  480. 43
  481. Men
  482. 12
  483. 0.0
  484. 1
  485.  
  486. TEXTBOX
  487. 22
  488. 200
  489. 172
  490. 218
  491. Monsters
  492. 12
  493. 0.0
  494. 1
  495.  
  496. BUTTON
  497. 17
  498. 407
  499. 187
  500. 440
  501. Setup
  502. setup
  503. NIL
  504. 1
  505. T
  506. OBSERVER
  507. NIL
  508. NIL
  509. NIL
  510. NIL
  511. 1
  512.  
  513. BUTTON
  514. 17
  515. 451
  516. 187
  517. 484
  518. Go
  519. go
  520. T
  521. 1
  522. T
  523. OBSERVER
  524. NIL
  525. NIL
  526. NIL
  527. NIL
  528. 1
  529.  
  530. PLOT
  531. 5
  532. 554
  533. 205
  534. 704
  535. Survivors
  536. ticks
  537. alive
  538. 0.0
  539. 10.0
  540. 0.0
  541. 10.0
  542. true
  543. false
  544. "" ""
  545. PENS
  546. "default" 1.0 0 -16777216 true "" "plot count turtles"
  547. "pen-1" 1.0 0 -13345367 true "" "plot count men"
  548. "pen-2" 1.0 0 -10899396 true "" "plot count monsters"
  549.  
  550. BUTTON
  551. 17
  552. 499
  553. 189
  554. 532
  555. Display Status
  556. status
  557. NIL
  558. 1
  559. T
  560. OBSERVER
  561. NIL
  562. NIL
  563. NIL
  564. NIL
  565. 1
  566.  
  567. CHOOSER
  568. 17
  569. 219
  570. 186
  571. 264
  572. monsters-1
  573. monsters-1
  574. "Ghoul" "Hobgoblin" "Ogre" "Orc"
  575. 3
  576.  
  577. CHOOSER
  578. 17
  579. 312
  580. 188
  581. 357
  582. monsters-2
  583. monsters-2
  584. "Ghoul" "Hobgoblin" "Ogre" "Orc"
  585. 0
  586.  
  587. SLIDER
  588. 17
  589. 361
  590. 189
  591. 394
  592. num-monsters-2
  593. num-monsters-2
  594. 0
  595. 20
  596. 5
  597. 1
  598. 1
  599. NIL
  600. HORIZONTAL
  601.  
  602. @#$#@#$#@
  603. ## WHAT IS IT?
  604.  
  605. Simplified model of original (1974) D&D combat.
  606.  
  607. ## HOW IT WORKS
  608.  
  609. Men vs monsters. Each combatant targets the closest enemy, and closes in at his max mv until they are in melee range. The attacker attempts to hit his target (using the tables in the 3LBBs, volume I), until attacker or defender dies. If defender dies, attacker picks next closest enemy, if any, and repeats process.
  610.  
  611.  
  612. ## HOW TO USE IT
  613.  
  614. Use controls to choose number of Fighting Men, their Level, AC and MV.
  615.  
  616. Use controls to choose up to two kinds of monsters and their numbers.
  617.  
  618. Click the setup button, and they are arrayed on the battlefield. See the screenshot on my Flickr photostream here http://www.flickr.com/photos/79364035@N04/8645207600/
  619.  
  620. Click the Go button and they fight until one side is destroyed. Screenshot here http://www.flickr.com/photos/79364035@N04/8645207760/
  621.  
  622. A plot shows the number of survivors at each tick.
  623.  
  624. ## THINGS TO NOTICE
  625.  
  626. Ghouls paralyze victims. Man bitten by Ghoul must save vs Paralysis or he's disabled for 2d4 rounds.
  627.  
  628. Ogres do extra damage (d6+2).
  629.  
  630. ## THINGS TO TRY
  631.  
  632. If men are disadvantaged, try increasing their level, ac, or number until balance is restored.
  633.  
  634. ## EXTENDING THE MODEL
  635.  
  636. Top 10 TODOs:
  637.  
  638. (1) Adding a d6 roll for a surprise round. And 25% chance to drop weapon if surprised.
  639. (2) Using agent's "heading" property and x/y coordinates to determine if a defender is flanked or attacked from the rear, in which case bonuses apply.
  640. (3) Add more monsters. Right now the model only supports 4-- Orcs, Hobgoblins, Ogres and Ghouls.
  641. (4) 1st level Fighting Man gets +1 to-hit bonus against "normals", and Nth level FM (N>1) gets N attacks against normals.
  642. (5) Add Cleric, Magic User, Elf, Dwarf and Hobbit.
  643. (6) Exploit NetLogo's 2D patches to code terrain (hill, wooded, marshy, ditch, river), structures (walls, towers), and so on.
  644. (7) Read battlefield setup (including troop types/locations/terrain) from file.
  645. (8) Allow for houserules.
  646. (9) Allow for combat engines other than the OD&D alternative combat system (ACS), incl. Chainmail 1:20, Chainmail man-to-man, Chainmail fantasy supplement, Greyhawk weapon type vs armor class, etc.
  647. (10) Get the "export as" Java applet and QuickTime movie to work.
  648.  
  649.  
  650. ## NETLOGO FEATURES
  651.  
  652. Makes use of higher-order functions (task/run).
  653.  
  654. ## RELATED MODELS
  655.  
  656. I wrote a simulation of OD&D combat in Perl. It supports surprise, drop weapon, more monsters. But It's just a 1-man to 1-monster slugfest. Not 2D. No graphics. No movement. It runs a given simulation many, many times and reports a number of statistics. The code is available in my pastebin at
  657.  
  658. http://pastebin.com/AJKw2x3N
  659.  
  660. ## CREDITS AND REFERENCES
  661.  
  662. @CopyLeft 2013 by Elisha "aher" Abuyah. All wrongs reserved. No warranties. Use however you like, no restrictions.
  663.  
  664. This code is available in my pastebin at
  665.  
  666. http://pastebin.com/u/aher
  667.  
  668. @#$#@#$#@
  669. default
  670. true
  671. 0
  672. Polygon -7500403 true true 150 5 40 250 150 205 260 250
  673.  
  674. airplane
  675. true
  676. 0
  677. Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15
  678.  
  679. arrow
  680. true
  681. 0
  682. Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150
  683.  
  684. box
  685. false
  686. 0
  687. Polygon -7500403 true true 150 285 285 225 285 75 150 135
  688. Polygon -7500403 true true 150 135 15 75 150 15 285 75
  689. Polygon -7500403 true true 15 75 15 225 150 285 150 135
  690. Line -16777216 false 150 285 150 135
  691. Line -16777216 false 150 135 15 75
  692. Line -16777216 false 150 135 285 75
  693.  
  694. bug
  695. true
  696. 0
  697. Circle -7500403 true true 96 182 108
  698. Circle -7500403 true true 110 127 80
  699. Circle -7500403 true true 110 75 80
  700. Line -7500403 true 150 100 80 30
  701. Line -7500403 true 150 100 220 30
  702.  
  703. butterfly
  704. true
  705. 0
  706. Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240
  707. Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240
  708. Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163
  709. Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165
  710. Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225
  711. Circle -16777216 true false 135 90 30
  712. Line -16777216 false 150 105 195 60
  713. Line -16777216 false 150 105 105 60
  714.  
  715. car
  716. false
  717. 0
  718. Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180
  719. Circle -16777216 true false 180 180 90
  720. Circle -16777216 true false 30 180 90
  721. Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89
  722. Circle -7500403 true true 47 195 58
  723. Circle -7500403 true true 195 195 58
  724.  
  725. circle
  726. false
  727. 0
  728. Circle -7500403 true true 0 0 300
  729.  
  730. circle 2
  731. false
  732. 0
  733. Circle -7500403 true true 0 0 300
  734. Circle -16777216 true false 30 30 240
  735.  
  736. cow
  737. false
  738. 0
  739. Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167
  740. Polygon -7500403 true true 73 210 86 251 62 249 48 208
  741. Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123
  742.  
  743. cylinder
  744. false
  745. 0
  746. Circle -7500403 true true 0 0 300
  747.  
  748. dot
  749. false
  750. 0
  751. Circle -7500403 true true 90 90 120
  752.  
  753. face happy
  754. false
  755. 0
  756. Circle -7500403 true true 8 8 285
  757. Circle -16777216 true false 60 75 60
  758. Circle -16777216 true false 180 75 60
  759. Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240
  760.  
  761. face neutral
  762. false
  763. 0
  764. Circle -7500403 true true 8 7 285
  765. Circle -16777216 true false 60 75 60
  766. Circle -16777216 true false 180 75 60
  767. Rectangle -16777216 true false 60 195 240 225
  768.  
  769. face sad
  770. false
  771. 0
  772. Circle -7500403 true true 8 8 285
  773. Circle -16777216 true false 60 75 60
  774. Circle -16777216 true false 180 75 60
  775. Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183
  776.  
  777. fish
  778. false
  779. 0
  780. Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166
  781. Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165
  782. Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60
  783. Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166
  784. Circle -16777216 true false 215 106 30
  785.  
  786. flag
  787. false
  788. 0
  789. Rectangle -7500403 true true 60 15 75 300
  790. Polygon -7500403 true true 90 150 270 90 90 30
  791. Line -7500403 true 75 135 90 135
  792. Line -7500403 true 75 45 90 45
  793.  
  794. flower
  795. false
  796. 0
  797. Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135
  798. Circle -7500403 true true 85 132 38
  799. Circle -7500403 true true 130 147 38
  800. Circle -7500403 true true 192 85 38
  801. Circle -7500403 true true 85 40 38
  802. Circle -7500403 true true 177 40 38
  803. Circle -7500403 true true 177 132 38
  804. Circle -7500403 true true 70 85 38
  805. Circle -7500403 true true 130 25 38
  806. Circle -7500403 true true 96 51 108
  807. Circle -16777216 true false 113 68 74
  808. Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218
  809. Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240
  810.  
  811. house
  812. false
  813. 0
  814. Rectangle -7500403 true true 45 120 255 285
  815. Rectangle -16777216 true false 120 210 180 285
  816. Polygon -7500403 true true 15 120 150 15 285 120
  817. Line -16777216 false 30 120 270 120
  818.  
  819. leaf
  820. false
  821. 0
  822. Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195
  823. Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195
  824.  
  825. line
  826. true
  827. 0
  828. Line -7500403 true 150 0 150 300
  829.  
  830. line half
  831. true
  832. 0
  833. Line -7500403 true 150 0 150 150
  834.  
  835. pentagon
  836. false
  837. 0
  838. Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120
  839.  
  840. person
  841. false
  842. 0
  843. Circle -7500403 true true 110 5 80
  844. Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90
  845. Rectangle -7500403 true true 127 79 172 94
  846. Polygon -7500403 true true 195 90 240 150 225 180 165 105
  847. Polygon -7500403 true true 105 90 60 150 75 180 135 105
  848.  
  849. plant
  850. false
  851. 0
  852. Rectangle -7500403 true true 135 90 165 300
  853. Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285
  854. Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285
  855. Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210
  856. Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135
  857. Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135
  858. Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60
  859. Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90
  860.  
  861. sheep
  862. false
  863. 15
  864. Circle -1 true true 203 65 88
  865. Circle -1 true true 70 65 162
  866. Circle -1 true true 150 105 120
  867. Polygon -7500403 true false 218 120 240 165 255 165 278 120
  868. Circle -7500403 true false 214 72 67
  869. Rectangle -1 true true 164 223 179 298
  870. Polygon -1 true true 45 285 30 285 30 240 15 195 45 210
  871. Circle -1 true true 3 83 150
  872. Rectangle -1 true true 65 221 80 296
  873. Polygon -1 true true 195 285 210 285 210 240 240 210 195 210
  874. Polygon -7500403 true false 276 85 285 105 302 99 294 83
  875. Polygon -7500403 true false 219 85 210 105 193 99 201 83
  876.  
  877. square
  878. false
  879. 0
  880. Rectangle -7500403 true true 30 30 270 270
  881.  
  882. square 2
  883. false
  884. 0
  885. Rectangle -7500403 true true 30 30 270 270
  886. Rectangle -16777216 true false 60 60 240 240
  887.  
  888. star
  889. false
  890. 0
  891. Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108
  892.  
  893. target
  894. false
  895. 0
  896. Circle -7500403 true true 0 0 300
  897. Circle -16777216 true false 30 30 240
  898. Circle -7500403 true true 60 60 180
  899. Circle -16777216 true false 90 90 120
  900. Circle -7500403 true true 120 120 60
  901.  
  902. tree
  903. false
  904. 0
  905. Circle -7500403 true true 118 3 94
  906. Rectangle -6459832 true false 120 195 180 300
  907. Circle -7500403 true true 65 21 108
  908. Circle -7500403 true true 116 41 127
  909. Circle -7500403 true true 45 90 120
  910. Circle -7500403 true true 104 74 152
  911.  
  912. triangle
  913. false
  914. 0
  915. Polygon -7500403 true true 150 30 15 255 285 255
  916.  
  917. triangle 2
  918. false
  919. 0
  920. Polygon -7500403 true true 150 30 15 255 285 255
  921. Polygon -16777216 true false 151 99 225 223 75 224
  922.  
  923. truck
  924. false
  925. 0
  926. Rectangle -7500403 true true 4 45 195 187
  927. Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194
  928. Rectangle -1 true false 195 60 195 105
  929. Polygon -16777216 true false 238 112 252 141 219 141 218 112
  930. Circle -16777216 true false 234 174 42
  931. Rectangle -7500403 true true 181 185 214 194
  932. Circle -16777216 true false 144 174 42
  933. Circle -16777216 true false 24 174 42
  934. Circle -7500403 false true 24 174 42
  935. Circle -7500403 false true 144 174 42
  936. Circle -7500403 false true 234 174 42
  937.  
  938. turtle
  939. true
  940. 0
  941. Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210
  942. Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105
  943. Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105
  944. Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87
  945. Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210
  946. Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99
  947.  
  948. wheel
  949. false
  950. 0
  951. Circle -7500403 true true 3 3 294
  952. Circle -16777216 true false 30 30 240
  953. Line -7500403 true 150 285 150 15
  954. Line -7500403 true 15 150 285 150
  955. Circle -7500403 true true 120 120 60
  956. Line -7500403 true 216 40 79 269
  957. Line -7500403 true 40 84 269 221
  958. Line -7500403 true 40 216 269 79
  959. Line -7500403 true 84 40 221 269
  960.  
  961. wolf
  962. false
  963. 0
  964. Polygon -16777216 true false 253 133 245 131 245 133
  965. Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105
  966. Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113
  967.  
  968. x
  969. false
  970. 0
  971. Polygon -7500403 true true 270 75 225 30 30 225 75 270
  972. Polygon -7500403 true true 30 75 75 30 270 225 225 270
  973.  
  974. @#$#@#$#@
  975. NetLogo 5.0.4
  976. @#$#@#$#@
  977. @#$#@#$#@
  978. @#$#@#$#@
  979. @#$#@#$#@
  980. @#$#@#$#@
  981. default
  982. 0.0
  983. -0.2 0 1.0 0.0
  984. 0.0 1 1.0 0.0
  985. 0.2 0 1.0 0.0
  986. link direction
  987. true
  988. 0
  989. Line -7500403 true 150 150 90 180
  990. Line -7500403 true 150 150 210 180
  991.  
  992. @#$#@#$#@
  993. 0
  994. @#$#@#$#@
Advertisement
Add Comment
Please, Sign In to add comment