01:49:57 <06m​umra> So I've been looking at this function for probably too long now, but I think there's a slight bug here (certainly it doesn't seem to be working as intended per what the comments say it should be doing, I'm just not sure which way to fix it) https://github.com/crawl/crawl/blob/d67f6492281a5b8d07af0ef746d709d4451a2aae/crawl-ref/source/monster.cc#L465 So it's monster::weapon(int which_attack) -- which_attack defaults to -1 and in most 01:49:58 cases this is what it's called with. Except during actual monster combat in which case it's called with 0..3 for the attack number. Comments say // Even/odd attacks use main/offhand weapon. But then further along // This randomly picks one of the wielded weapons for monsters that can use // two weapons. Not ideal, but better than nothing. fight.cc does it right, // for various values of right. Already a bit contradictory, and despite 01:49:58 looking at quite a bit of fight.cc it's also not clear what is meant by that reference. The problem here is that if which_attack == -1 and it's a two-weapons monster, we'll end up at the coinflip. But it's called with no parameters for all kinds of things that generally don't want the weapon randomised and would exhibit unspecified behaviour if the function is returning a different weapon twice in a row. See screenshot of just one example I quickly 01:49:59 found, but it's used like this all over the place. In this example the skill could get the multiplier when it's not even the weapon that's going to end up being used. Then for the case 0 <= which_attack <= 1 -- i.e. a two-weapon monster actually attacking -- the randomness is not used, the randomness would only be used for >= 2. And that never even happens, because all the monsters currently with two weapons only have two attacks anyway. 01:49:59 <06m​umra> https://cdn.discordapp.com/attachments/747522859361894521/1286610290082840577/image.png?ex=66ee88b5&is=66ed3735&hm=e2a4c1a79ed95beaefb719538b4586ddb686d736429593f6effd4249a83b22d1& 01:50:00 <06m​umra> So it seems the comment is misleading at best and there is some unexpected randomness when calling this function for certain monsters. I think the right solution here is to get rid of the coinflip and just return main/offhand based on odd/even as the first comment says. And for -1 just return the currently equipped weapon which is what you'd expect? 01:59:57 <06m​umra> (The number of monsters that even have two_weapons is already a very exclusive list, and blademasters specifically have the same weapon copied twice so this would never even make a difference. But I think for coglin player shadows particularly you might get some really confusing behaviour depending on circumstances...) 03:34:00 Experimental (bcrawl) branch on underhound.eu updated to: 0.23-a0-5208-geafff8c3b6 03:38:40 i wanted brighter webtiles for sunny porches, but my computer was at its limit. until a lil jabbascript came along https://no.dungeon.red/5w 04:04:58 <06m​umra> I've also found tiles rather dark overall of late (maybe eyes are growing dim with age...) 04:06:49 <06m​umra> Would be nice to add in a setting for this but I wouldn't do it with the CSS filters as you've done -- these can cause crazy overheating on laptops because it all goes through GPU 04:07:15 <06m​umra> But it could be done at the canvas level where tiles are actually rendered 05:22:43 Unstable branch on crawl.akrasiac.org updated to: 0.33-a0-123-gd67f649 (34) 06:15:24 totally agree mumra, i wanted to do canvas but naturally couldnt as a hack 06:50:23 i originally wrote it as a canvas filter, not css. suppose if we'd wanna respect a setting in crawlrc, I wouldn't mind opening the initial PR 06:52:43 <04d​racoomega> I wonder how often the commonly repeated pattern of a god argument in summon spells (so that if the spell is cast by a god instead of the player, the summon will also worship that god) is ever actually used in a way that matters 06:53:18 <04d​racoomega> Like, not divinely associated spells/effects, to be clear. I'm not talking about Brothers in Arms, but like... there's an argument so that if a god just plain cast Summon Mana Viper, the viper could be worshipping them 06:54:31 <04d​racoomega> Heck, even Battlesphere has such an argument 06:54:38 <04d​racoomega> For however religious a non-sentient ball of energy can be 06:57:55 <04d​racoomega> Like, this has been used in a huge lot of spells (but not all of them) and as I continue to sketch up refactoring on things, I wonder how much it's necessary. The thing is, most of them still can't even be used as god wrath effects (even if we wanted to for some reason) because they can't actually set blame for something other than the player 06:58:53 <04d​racoomega> This ends up being entirely 'So that a god could summon a god-worshipping mana viper on the player's behalf' 06:59:21 <04d​racoomega> (I wonder if Xom is the only god that ever casts player spells directly?) 07:00:58 good thoughts/commentary 07:03:28 <04d​racoomega> Yeah, the more I look, the more I think this entire thing for player spells may be just for Xom 07:05:52 <04d​racoomega> I'd say this was mildly amusing, but I'm not sure there's even any way to have any visible effect from this in-game 07:06:44 <04d​racoomega> Generally the only way a monster god is explicitly visible in-game is via a cast message that invokes them, which generally also means 'priest monster' and I'm not sure there are any player spells that can create one of those anymore 07:09:31 <04d​racoomega> Since the summon owner is still the player, even abandoning Xom won't do anything special to secretly-Xom-worshipping quokkas. They remain friendly. 07:15:17 <04d​racoomega> Monster summons make use of this god argument more often, since 'priestly' spells will inherit the god of the summoner. Though this also leads to some oddness where, say, demons summoned by orc sorcerers worship no god, while demons summoned by orc high priests worship Beogh 07:19:52 <04d​racoomega> (But basically, as I change the method signature of mgen_data::set_summoned and add a couple more optional parameters, I find myself wondering if specifying a god should remain a parameter of that method or be factored out to, say, a mgen_data::set_god that was used far less often (but for that to make sense, it would want to be used only specifically in places where it actually matters as opposed to 'a large chunk of places, even 07:19:53 if it seems to never matter there') 07:40:12 <06m​umra> Can crawl_state.which_god_acting() not cover this anyway rather than needing a param? 07:42:09 <06m​umra> (But yeah it seems to make no mechanical difference anyway) 07:43:51 <06m​umra> Actually god is already set to the value of which_god_acting() in your_spells 07:44:10 <06m​umra> I think this can also be Sif with Exegesis? 07:44:25 <04d​racoomega> Oh, can it? 07:45:16 <04d​racoomega> Seemingly no 07:45:47 <04d​racoomega> Stuff summoned via Exegesis appears to still be GOD_NO_GOD 07:48:09 <06m​umra> beam.cc is also doing the same thing for Fire Vortices ?? 07:48:11 <06m​umra> https://cdn.discordapp.com/attachments/747522859361894521/1286700442637828207/image.png?ex=66eedcab&is=66ed8b2b&hm=9b8e9fad22b4f4ace25a80652b7e41136e1d51ddfee77bf4d114e92449e47e34& 07:48:59 <06m​umra> feels like something that maybe mattered once and doesn't anymore. or it was planned it would matter one day and nobody remembers why 🙂 07:50:01 <04d​racoomega> I'm sure at least some degree of this is "Other spells do this, so this new thing also should." for who knows how many years 07:50:36 v likely 07:51:11 <04d​racoomega> Places where it actually visibly matters mostly tend to set it directly. Like Brothers in Arms or Divine Warrior or various Xom-specific summons 07:55:07 <06m​umra> Maybe I am missing something but it seems like crawl_state.which_god_acting will never be anything except GOD_NO_GOD 07:55:59 <04d​racoomega> No, it does work for Xom at least 07:56:44 <04d​racoomega> ie: C++ // actually take the action! { god_acting gdact(GOD_XOM); _do_xom_event(action, sever); } 07:58:07 <04d​racoomega> Huh. Now that I notice, you can just set the monster's god in the base constructor for mgen_data. Funny how you have to call that before .set_summoned anyway, even though the latter can ask for it again. All the more convinced to just pull it out of there entirely. 07:58:27 <04d​racoomega> (Also, apparently briars created by Fedhas invocations have Fedhas as their god, but none of the other plants do) 07:58:43 <04d​racoomega> I'm not sure this has any actual effect 08:00:49 <06m​umra> Ah yeah ... missed it because inc_god_acting is called from the god_acting ctor ... this kind of thing always seems like rather an anti-pattern to me ... simply constructing an object shouldn't really be mutating global state without an explicit function call 😛 08:01:22 <04d​racoomega> I guess the idea is to reduce the chance that one forgets to unset the global state 08:01:34 <04d​racoomega> Since it happens automatically when the object goes out of scope, and thus will always happen 08:02:06 <04d​racoomega> (I feel some stuff related to conducts works in a similar-yet-even-more-confusing way, if I recall?) 08:02:46 <06m​umra> random subgenerators do a similar thing 08:04:35 <06m​umra> if i wanted to make the flow super clear i'd prob have implemented a callback pattern god_is_acting(GOD_XOM, [](){ /* do xom stuff here */ }) 08:07:30 <06m​umra> anyway it sounds like enough of a rabbit hole you're down already 😂 08:08:19 <04d​racoomega> Honestly, probably more htan I even anticipated when I started this 08:08:51 <04d​racoomega> "I will tidy up some things so Forgecraft stuff can be a bit less hacky when I add them." 08:09:22 <04d​racoomega> And just finding more and more and more interconnected weirdness 08:09:47 <04d​racoomega> That make me go "While I'm at this, I really ought to straighten some of this out." 08:16:24 <06m​umra> This tangentially reminds me, I have a design for an Orb ego which was relatively straightforward to implement -- provisionally called "Orb of Company", it raises all your summons limits by 1 , except for spells for which that doesn't make sense, which are mostly spells that seem like they'll probably move to forgecraft anyway. 08:36:28 i tried thinking of a better name and didn't like any of them 08:39:59 * geekosaur thinks "companionship" works slightly better than "company" there 08:52:15 <06m​umra> Companionship feels a bit ... long. Did consider Friends or Friendship. (Looks up some synonyms:) Companions / Familiars / Allies / Compadres (Compadre's Orb?) ... allies possibly too much implies it should work for non-summons e.g. granting an extra apostle, or other god summons 09:00:17 <06m​umra> maybe something more related to "armies/groups" ... Orb of the Horde / Legion / Flock ... Orb of Herding ... 09:01:03 i think ive now leaned too into the orb of company, remembering the black company (books) 09:01:12 i will bark when I read a better thing lol 09:03:26 four door horde orb 09:05:30 <06p​leasingfungus> orb of buds 09:06:13 <06p​leasingfungus> orb of multitudes 09:07:20 <06p​leasingfungus> fwiw this effect sounds both narrow (only for summoners) and confusing (which spells will it affect?), which makes me think it should be an unrand rather than an ego 09:11:12 <06p​leasingfungus> contrast eg orb of energy, which is useful both for summoners and many other casters 09:11:54 <06p​leasingfungus> orb of guile is maybe closer, but still feels like it has a somewhat broader area of potential application? 09:38:14 <06m​umra> Sure the narrowness was also my concern. The "which spells" aspect gets rather simpler with forgecraft because then it's pretty much "any actual Summoning spell (not necro/forgecraft), except Canine Familiar" 09:39:26 <08n​icolae> Orb of Pals 09:44:45 Orb of Pets 09:46:54 <04d​racoomega> Orb of Pets that specifically dislikes dogs, alas 09:47:29 <04d​racoomega> (Trying to think if any of my planned 0.33 Summoning spells would interact awkwardly with this or not) 09:47:38 <06m​umra> as a staff of summoning ego it'd maybe be TOO good? where the orb is in a nice place is it's something that'd help a lot earlier on as a summoner but at some point you probably want to use the slot for something else. and the highest level summoning spell is unaffected by the cap anyway 09:51:42 <04d​racoomega> To be honest, while the effect is sort of cute, I'm not actually sure exactly how beneficial having +1 summon is for a lot of these spells, in practice, given the typical orb opportunity cost (which is already an issue for orbs in general). You do still have to spend additional turns and MP to get any benefit, and as you say, it's mostly meaningful at lower levels. (Doesn't matter for Dragon's Call, XXX and Haunt already have a very 09:51:42 high cap, wouldn't work properly with Malign Gateway or Summon Forest). Does matter a moderate amount for Menagerie/Hydra (and a bunch of lower level spells) 09:55:55 <04d​racoomega> (I'm not actually sure it's that much more narrow than Orb of Guile, but Guile is at least strong in the niche that it has) 09:57:41 <07z​ureal> Next up for getting sued by Nintendo 09:59:59 <06m​umra> maybe along with a chance to get a free bonus summon when you cast a summon spell (altho then it's kind of overlapping with orb of energy giving free MP) 10:49:37 <08n​icolae> make it do like monsters do and abjure things when you cast a summoning spell 12:15:09 <04d​racoomega> Huh. I have found exactly one use so far where the god argument is doing basically anything. 12:15:38 <04d​racoomega> Which is that Summon Horrible Things only has a chance to drain the player's int if the god is GOD_NO_GOD 12:15:52 <04d​racoomega> (ie: to keep Xom from causing int drain if they cast it through you) 12:16:40 <04d​racoomega> I'm not sure how much this even matters to preserve, tbh. It's long past the days when that can ever directly kill you, and Xom doing something minorly double-edged just seems to be Xom being Xom? 12:21:54 <06p​leasingfungus> yeah, seems like a nothing 12:23:49 <04d​racoomega> (The few summons with detailed argument descriptions also usually say misleading things about the god argument. ie: that it's "What god is worshipped by the caster" even though this isn't actually usually true) 12:24:39 <04d​racoomega> Although amusingly, Summon Dragon very specifically ignores the usual rule and will inherit a monster caster's god, even if they aren't a priest 12:24:48 <04d​racoomega> Which still doesn't actually do anything, even if it were possible for a caster of this to have a god 12:25:00 <04d​racoomega> The more I poke at this, the more levels of "Wow, this doesn't matter" I get on ^^; 12:26:39 <04d​racoomega> (Index asked "What if Xom uses shadow creatures on Holy Pan. Does this mean the angels summoned there will no longer worship Xom?" but of course it turns out this is done by unrelated custom code anyway and would be unaffected) 12:37:28 <04d​racoomega> Oh, apparently there is one effect I didn't anticipate. If 'god' is set on a summon, this also gets flagged as a god gift upon creation, and Xom tension calculation specifically considers friendly god gifts to be worth more tension reduction than the same friendly monster would if it wasn't a gift (supposedly something around making them more likely to consider one intervention 'good enough'). And removing all this 12:37:29 otherwise-pointless code means that Xom-custom gifts now score tension differently than summons cast through the player. 12:37:48 <06p​leasingfungus> ... 12:37:50 <04d​racoomega> (Of course, Index thinks that tension just shouldn't weight those different anyway) 12:38:01 <04d​racoomega> And she might be right 12:38:55 <04d​racoomega> (After all, when Xom does things to enemies directly, it doesn't score the tension change any differently than if the player had, in terms of "Is the situation still bad after this?") 12:39:05 <04d​racoomega> Not like it tracks whether the confusion was Xom's doing or yours 12:40:12 <04d​racoomega> So yeah, I'm not going to let that stop me from removing this, and we can look into removing that bit from tension calculation code entirely at some later point 12:40:24 <06p​leasingfungus> cut! cut! cut! 12:40:27 <06p​leasingfungus> makes me want to remove things 12:40:28 <04d​racoomega> Haha 12:40:40 <06p​leasingfungus> hm, now what's our least favorite background 12:40:47 <06p​leasingfungus> (joking!) 12:40:49 <06p​leasingfungus> (probably) 12:41:43 <04d​racoomega> Oddly enough, I'd say the only ones that aren't clearly distinct from each other in some meaningful way are also the ones that are the most popular 12:41:58 <06p​leasingfungus> heh 12:42:06 <04d​racoomega> (Fighter and Gladiator are pretty similar, but remain very popular) 12:42:09 <06p​leasingfungus> yep 12:42:17 <06p​leasingfungus> and brigand isn't exactly in another zip code 12:42:30 <06p​leasingfungus> monk likewise... 12:43:09 <04d​racoomega> Monk's gimmick is relatively subtle, but also kind of cool 12:51:36 <06p​leasingfungus> sure 12:55:18 <04d​racoomega> Huh. The spiders generated by AF_SPIDER don't actually share the summon cap with the spiders broodmothers can make via the spell instead. I think I kind of assumed they did. 12:55:44 <04d​racoomega> (They have no cap at all, seemingly) 12:56:16 <04d​racoomega> Just less likely to see a ton of them because they do need to actually be hitting the player a bunch with a 40 damage attack 13:09:53 <12g​e0ff> yeah, it's not clear why Br and En have to be separate backgrounds and can't be combined. 13:11:57 <04d​racoomega> They're... they're not really very similar, imo? (I mean, that was even the point of renaming Assassin to Brigand, as I understand it) 13:12:15 <06p​leasingfungus> i think there is a nonzero chance that ge0ff is trolling me. 13:12:44 <06p​leasingfungus> this channel is not immune to jokes... or, at least, the channel topic doesn't clarify 13:19:28 <12g​e0ff> En and Br are both short blade-focused chars, but, if we ignore the starting stats, the only difference is starting with 3 curare darts vs. 2 invis potions. A one species En that finds curare darts on D:1 could have exactly the same game trajectory as another species Br that finds and identifies some potions of invisibility early on. 13:20:02 <12g​e0ff> (also, Br's +3 to Str doesn't make much sense after making short blades use Dex for damage) 13:20:05 <04d​racoomega> ...what happened to all the spells? 13:20:35 <12g​e0ff> hex books on D:1-2 are not too rare currently 13:21:28 <12g​e0ff> (but also, starting spells is something that makes En more interesting than Br) 13:34:51 <09g​ammafunk> well more to the point, the only difference is definitely not starting with 3 curare darts vs. 2 invis potions! 13:36:48 <12g​e0ff> if someone wants to poke enemies with short swords w/o using magic, there's Fi and Gl options too 14:59:17 <04d​racoomega> Huh. Summoned monsters don't bleed? 14:59:39 <04d​racoomega> From taking attack damage, at least, it looks like 14:59:41 <04d​racoomega> I'd never noticed 15:07:17 <04d​racoomega> (But Mindburst, at least, will still make them bleed) 15:09:00 <04d​racoomega> Also flayed ghosts, but not BEAM_MMISSILE 15:10:00 <04d​racoomega> I mean, summons are pretty tangible so long as they're actually there. I wonder if the original idea was that they shouldn't leave permanent bloodstains if even their corpse goes away afterward? 15:10:44 <04d​racoomega> (And of course, tracking that is a large pain) 15:12:58 <04d​racoomega> I guess it does affect ignite blood fairly meaningfully, were I to change this. (Moreso because it would mean that your summons could bleed on the ground and make flame clouds for you. Though it has the awkward interaction, of course, of your summons also not living very much) 15:37:15 <04d​racoomega> Isn't the second version so much nicer than the first? ^^; C++ int summon_type = 0; act.is_summoned(nullptr, &summon_type); if (!player && have_passive(passive_t::cloud_immunity) && (act.as_monster()->friendly() && summon_type == MON_SUMM_AID)) C++ if (!player && have_passive(passive_t::cloud_immunity) && act.is_summoned_by(MON_SUMM_AID)) 15:39:54 Unstable branch on underhound.eu updated to: 0.33-a0-123-gd67f649228 (34) 19:40:01 -!- The topic of #crawl-dev is: Crawl Development | https://github.com/crawl/crawl | Logs: http://s-z.org/crawl-dev/, temporarily http://crawl.akrasiac.org/logs/cheibriados/ | People with +v have commit access, devs on bridged discord as well | General Crawl-related chat to #crawl | Long stuff to a pastebin service, please 19:40:01 -!- The topic of #crawl is: Play Dungeon Crawl Stone Soup online now! Type ??online for instructions, ??lg / !lg for play stats | PM Sequell for long queries | http://crawl.develz.org | FooTV game replays: ??footv for instructions | #crawl-dev for dev discussion, #crawl-offtopic for offtopic 23:46:42 Monster database of master branch on crawl.develz.org updated to: 0.33-a0-123-gd67f649228